legalthings / angular-signature

HTML5 canvas based smooth signature drawing as angularJS directive (http://szimek.github.io/signature_pad/)
MIT License
105 stars 91 forks source link

Add onMouseleave event #65

Open FabienCharlet opened 7 years ago

FabienCharlet commented 7 years ago

First, thanks for your work !

I want to report a problem when you start to draw a signature in the canvas and release the mouse outside the canvas. The line is not saved.

Simply add ng-mouseleave="onMouseup()" in the canvas declaration to fix the problem :)

adrogon commented 7 years ago

Thank you for your idea, implemented it under #66. Also checks whether the left button is depressed, so that onMouseup() is not executed by simply mouseovering the canvas.