You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a question, please ask it on StackOverflow and use signature-pad tag instead of creating an issue.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If a point group only has 2 points, nothing gets drawn.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/szimek/h80phxyr/). https://jsfiddle.net/xvoqnyu9/16/
Not quite sure why clicking the buttons multiple times crashes signature_pad. So just refresh (or save) before clicking each button. You can see the one with 2 points does not render anything while the one with 3 points renders a line.
What is the expected behavior?
Even with 2 points it should render a line.
Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
As far as I know it hasn't worked previously. 4.1.5 affected, chrome latest.
EXPLANATION:
signature_pad.ts line 575 allows a point group with 2 points to go through to the _addPoint function (for the curve).
signature_pad.ts line 454 does not allow something with 2 points to go through to the rest of the logic. This is fine if there are more points, but if there are ONLY 2, then nothing happens and the logic ends there. The point group is essentially ignored.
I'm not sure if this is intentional. Maybe the customer we have that provided this point group just needs to provide better point groups.
The text was updated successfully, but these errors were encountered:
The signature is created by adding Bezier curves so the drawing follows closer to the place the user actually signed instead of lines connecting points that we happened to detect. The Bezier curves require 4 points to calculate. We fudge the beginning a little by introducing the first point twice so we can calculate the first curve with 3 points. You can read more about it here.
It absolutely makes sense. However just like there's an exception to the rule for a pointgroup with only 1 point (draws a dot) maybe there could be an exception for 2 points that draws a straight line. What do you think?
If you have a question, please ask it on StackOverflow and use
signature-pad
tag instead of creating an issue.Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If a point group only has 2 points, nothing gets drawn.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/szimek/h80phxyr/).
https://jsfiddle.net/xvoqnyu9/16/
Not quite sure why clicking the buttons multiple times crashes signature_pad. So just refresh (or save) before clicking each button. You can see the one with 2 points does not render anything while the one with 3 points renders a line.
What is the expected behavior?
Even with 2 points it should render a line.
Which versions of SignaturePad, and which browser / device are affected by this issue? Did this work in previous versions of SignaturePad?
As far as I know it hasn't worked previously. 4.1.5 affected, chrome latest.
EXPLANATION:
signature_pad.ts line 575 allows a point group with 2 points to go through to the _addPoint function (for the curve).
signature_pad.ts line 454 does not allow something with 2 points to go through to the rest of the logic. This is fine if there are more points, but if there are ONLY 2, then nothing happens and the logic ends there. The point group is essentially ignored.
I'm not sure if this is intentional. Maybe the customer we have that provided this point group just needs to provide better point groups.
The text was updated successfully, but these errors were encountered: