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

Feature suggestion: HiDPI #12

Open lucas-pelton opened 7 years ago

lucas-pelton commented 7 years ago

This tool is really great, but when using it on mobile devices, the signatures have very small pixel dimensions. I found a polyfill that causes all browsers to respect the pixel density of HiDPI devices: https://github.com/jondavidjohn/hidpi-canvas-polyfill

The combo of these two works great the first time around, but using the method clearCanvas causes the canvas size to be improperly calculated and the signature area grows while being cleared.

It may be easier to integrate the backing canvas calculations into your script than to make compatible with this particular tool. I don't have any experience with Canvas to offer a suggestion on how to accomplish, other than to propose that it would be a great feature to include HiDPI in your script.

Thanks!