drozhzhin-n-e / ngx-pinch-zoom

Module provides for image zooming and positioning with use of gestures on a touch screen.
http://ivylab.space/pinch-zoom
MIT License
113 stars 95 forks source link

Error if initially disabled #73

Open ilativity opened 4 years ago

ilativity commented 4 years ago

In case I put [disabled]="true" then a following error message is occur. Please take a look

core.js:4352 ERROR TypeError: Cannot read property 'isDragging' of undefined at PinchZoomComponent.get isDragging [as isDragging] (ngx-pinch-zoom.js:911) at PinchZoomComponent_Template (ngx-pinch-zoom.js:998) at executeTemplate (core.js:7451) at refreshView (core.js:7320) at refreshComponent (core.js:8467) at refreshChildComponents (core.js:7126) at refreshView (core.js:7370) at refreshComponent (core.js:8467) at refreshChildComponents (core.js:7126) at refreshView (core.js:7370) at refreshEmbeddedViews (core.js:8421) at refreshView (core.js:7344) at refreshEmbeddedViews (core.js:8421) at refreshView (core.js:7344) at refreshComponent (core.js:8467)

https://github.com/drozhzhin-n-e/ngx-pinch-zoom/blob/8adb728d0e192fd4cde805b35087326fec16cad9/src/app/pinch-zoom/pinch-zoom.component.ts#L113