willowsystems / jSignature

jQuery plugin - draw signature in browser.
720 stars 266 forks source link

Massive diagonal line captured instead of signature #74

Open dantelent opened 8 years ago

dantelent commented 8 years ago

In our implementation we are using jSignature in a Cordova project to capture signatures from Android devices.

We have encountered an issue where-by signatures are not being captured but rather a diagonal line with a size of 460592x460592 is being saved.

This does not happen every time, and sometimes we capture multiple signatures at the same time and one will work and the other results in the error as described.

Some initial observations suggest this may happen if the user rotates the device prior to adding their signature but this is not confirmed.

diagonal-line

twinharbor commented 8 years ago

I've been seeing a similar issue as well. We had issues converting the resulting SVG file to a jpg image, but only sporadically. I'm looking at one sample and I see some very long lines way out of bounds. The document size winds up being really huge. I'm wondering if it's possible to eliminate any paths that are out of bounds before saving, or find some way of detecting those out of bounds paths when the signature is collected.

Did you ever find any resolution?

dantelent commented 8 years ago

@twinharbor I'm afraid we have not found a resolution to this problem. The issue only occurs sporadically for us too so we have not given a lot of focus to tracking down the conditions under which it occurs.