bencentra / jq-signature

jQuery plugin for creating touch-friendly signature fields using the HTML5 canvas
http://bencentra.github.io/jq-signature/
MIT License
47 stars 28 forks source link

Allow dynamic resizing of <canvas>'s #1

Open bencentra opened 9 years ago

bencentra commented 9 years ago

When the width of a canvas changes, it clears the canvas' context. This means everything drawn goes away, as well as all other settings (stroke color, thickness, etc).

Add a way to save the state of the canvas before resizing the window, then restore it (properly, given the altered width) when resizing the canvas.