android-signaturepad icon indicating copy to clipboard operation
android-signaturepad copied to clipboard

SVG export duplicates last path

Open holubikj opened this issue 8 years ago • 3 comments

If you call getSignatureSvg() multiple times upon created signature, it's adding last SVG path again and again.

holubikj avatar Feb 10 '17 13:02 holubikj

In the SvgBuilder.build(final int width, final int height) function there is a call to append the current path. This will keep adding the current path upon each getSignatureSvg call as you have discovered. I think the appendCurrentPath() function should also set the _currentPathBuilder to null so that once a path is appended it cannot be appended again.

adamcoulter avatar Feb 10 '17 14:02 adamcoulter

Yep, this fix works. Thanks!

holubikj avatar Feb 10 '17 15:02 holubikj

Thanks for finding and fixing that bug. Would you mind to create a pull request, so I can merge that fix into the master branch?

gcacace avatar Feb 10 '17 23:02 gcacace