Skip to content

🐛 props fix #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 28, 2017
Merged

🐛 props fix #14

merged 2 commits into from
Nov 28, 2017

Conversation

shazha
Copy link
Contributor

@shazha shazha commented Nov 28, 2017

This PR addresses the following issues:

  1. prop autoColor and whiteMargin are always TRUE and it's caused by the following code in vue-qr.js:
    autoColor: toBoolean(that.autoColor) || true
    whiteMargin: toBoolean(that.whiteMargin) || true
  2. prop logoCornerRadius not working with number value 0 while it's working when using string value 0 due to the code:
    logoCornerRadius: that.logoCornerRadius || 8
  3. In awesome-qr, the bindElement is optional. It provides the ability to not bind to any HTML node and only return the dataURI generated for further processing. However, vue-qr always binds the generated QR image data to a HTML node and it's not so handy in some scenarios.

To adress issue 1 and issue 2, I moved the default value for each prop to props definition and added validations for them. And for backward compatibility, String value is also allowed for whiteMargin, autoColor and binarize.
To address issue 3, I added a new prop named bindElement which accepts Boolean value with default value TRUE.

Regards,

@Binaryify Binaryify merged commit de96b01 into Binaryify:master Nov 28, 2017
@Binaryify
Copy link
Owner

you are awesome, I appreciate it

Binaryify pushed a commit that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants