brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
694 stars 529 forks source link

jSignature renders each stroke twice (or seems to render its vectors) #108

Open MRpos opened 8 years ago

MRpos commented 8 years ago

When using your jSignature demo at brinley.github.io/jSignature I get every stroke rendered twice! It seams that there is always rendered a straight line between two points in addition to the curved one. See attached screenshot. The effect is worst in IE11, but e.g. also visible in FF 45.

What's going wrong here?

jsignature issue attachment

icnatejackson commented 7 years ago

see issue https://github.com/brinley/jSignature/issues/45 . There is a workaround that doesn't totally eliminate the issue, but it really reduces the visible artifacts for me.

RMY1 commented 6 years ago

Hi. Thank you for workaround... Unfortunately the "workaround" does not seem to reduce "side effects".

spa49 commented 6 years ago

@icnatejackson @RMY1 @MRpos think it is not the strokes that get rendered it is the vectors lines of the line smothing that get rendered see here unfortunately Im not familiar with the code nor with JS itself so I´m struggling to find a solution... can one of you maybe help understand how the data is captured ... maybe we can summarize the vectordata by consolidating it with the actual stroke data in the dataset to avoid it being rendered with the strokes

duckie-rcn commented 5 years ago

Hello, i downloaded the non minified version of the code and noticed that the basicCurve function is defined as:

basicCurve = function(ctx, startx, starty, endx, endy, cp1x, cp1y, cp2x, cp2y){ ctx.beginPath(); ctx.moveTo(startx, starty); ctx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, endx, endy); ctx.closePath(); ctx.stroke(); }

Commenting the closePath(); line seems to end the "double rendering" issue.