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

Disable the directive #50

Closed dashawk closed 7 years ago

dashawk commented 7 years ago

I cannot disable this, tried using ng-disabled but it did not work. However, there is an option from here like this signaturePad.off();. I'm not sure where to put it.

JonSnaka commented 7 years ago

Hi,

I also needed this functionality, so I have made a PR for it. I added a disabled attribute to the directive for you to use. You can then use it like: <signature-pad accept="accept" clear="clear" disabled="yourVariable" height="200" width="700">

Hope it helps!