wulfsolter / angular2-signaturepad

Angular2 Component for szimek / signature_pad
MIT License
176 stars 157 forks source link

`Cannot read property 'offsetWidth' of undefined` on resizeCanvas #94

Closed YoYuUm closed 4 years ago

YoYuUm commented 4 years ago

After the latest bump (2.10.0) I get an error ERROR TypeError: Cannot read property 'offsetWidth' of undefined that seems to be related to this change:

https://github.com/wulfsolter/angular2-signaturepad/commit/daa45b8722e92ecce67d438065406d385c2fd186#diff-863482ce59691afb432941df21bb7f90R59

signaturePad doesn't have property called canvas, but _canvas seems to be there still

wulfsolter commented 4 years ago

I don't use this library at all - would you mind doing the change, testing on your machine to make sure it works and sending a PR and then I can merge and publish?

Quentame commented 4 years ago

I have the same issue on 2.10.0, reverted on 2.9.0 to make it work.