I've just diagnosed an issue with jSignature resizing.
We had a situation with multiple jSignature controls was one instance was hidden and a window resize occurred / device rotation.
If you look at the function:
function conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance, settingsWidth, apinamespace, globalEvents)
It evaluates $parent.width() which returns 0 if the control is hidden.
The resize calculates the scale using w * 1.0 / originalParentWidth
When w = 0, it then multiples all the points by zero and corrupts the signature data.
Would it be possible to commit a fix that checks the width > 0 to prevent data loss.
I've just diagnosed an issue with jSignature resizing.
We had a situation with multiple jSignature controls was one instance was hidden and a window resize occurred / device rotation. If you look at the function:
function conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance, settingsWidth, apinamespace, globalEvents)
It evaluates $parent.width() which returns 0 if the control is hidden. The resize calculates the scale using w * 1.0 / originalParentWidth When w = 0, it then multiples all the points by zero and corrupts the signature data.Would it be possible to commit a fix that checks the width > 0 to prevent data loss.