thread-pond / signature-pad

A jQuery plugin for assisting in the creation of an HTML5 canvas based signature pad. Records the drawn signature in JSON for later regeneration.
BSD 3-Clause "New" or "Revised" License
727 stars 292 forks source link

Redraw speed when regenerating signatures #220

Closed RemarkLima closed 2 years ago

RemarkLima commented 2 years ago

It would be a good feature if you could redraw the signature / image when regenerating the image from the JSON data.

So you can see a signature being re-written as you load up the page.

mockdeep commented 2 years ago

@RemarkLima I have a feeling this is not a feature will ever be added to signature-pad. I'm not sure, but you might be able to dynamically loop over the JSON on your end and set the signature repeatedly. I'm not sure if the JSON is in a format where you can necessarily tell what order the signature was drawn, though.

RemarkLima commented 2 years ago

@mockdeep thanks for the reply - I'd assumed the JSON data was in the order in which the cursor travelled, so you could just iterate over each coordinate of the array, but if it's rationalised somehow, then yes it'll never work! I'll have a play but perhaps best to close this.