-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
minDistance option can't be initialized to 0 #299
Comments
Thanks for reporting this! Yes, please create a PR for this issue ;) I'll release 2.3.1 then with this fix. |
All set, let me know if you need any changes to the PR, thanks! |
@remomueller Just one question - did you intentionally want to set |
Yep, I was using 2.2.0 of the signature pad before this, and when I tried 2.3.0, I saw that there was a note about the slight lag introduced by the feature change (and the ability to get the 2.2.0 functionality back). I tried it out, setting the distance to In the end, I decided I preferred the "snappier" response time to signing as it feels better, than trying to make slower signatures look nicer. Also, signing slowly, I didn't see that great of an improvement in the look between the two. |
Thanks! Yeah, it was just an attempt to make it less pixelated when someone draws slowly. I guess it wasn't very successful after all ;) I'd need to find more time to implement a more fancy algorithm to make it smoother... |
In any case, thanks for creating such a cool signature library! It's far ahead of the JS libraries I tried a couple of years ago. Also, I'm sorry can't help with developing JS test suite (I'm more of a Ruby developer), maybe someone can make pull requests for those! |
Good luck! I'll be keeping an eye on the releases and changelog as you push those out! |
Do you want to request a feature or report a bug?
Reporting a bug
The new option to set
minDistance: 0
during the signature pad initialization does not work, since0
is skipped in the0 || 5
evaluation. JavaScript OR EvaluationWhat is the current behavior?
In the following example the option is set to
0
, and the resulting minDistance is displayed below the signature pad. I expected to see it assign0
, but instead it assigned5
.https://jsfiddle.net/bvf29kdn/1/
Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
Using v2.3.0. The assignment of 0 bug is on the following line:
https://github.com/szimek/signature_pad/blob/v2.3.0/src/signature_pad.js#L13
The following could potentially solve this issue: (Similar to how "throttle" is assigned).
Thanks! (I can submit a pull request to fix as indicated above if that sounds good, just let me know!)
The text was updated successfully, but these errors were encountered: