ngx-pinch-zoom
ngx-pinch-zoom copied to clipboard
dynamically changing image size and/or window resizing does not adjust zoom level restriction on ivy-pinch-pro-1.4.0
pinch-zoom is intelligent in that it restricts zoom according to the size of the image being wrapper. A larger image will allow more zooming.
I am using pinch-zoom to wrap an image. If I dynamically change the image to a different image, the zoom restriction does not reflect the dimensions of the new image. I have to destroy pinch-zoom and then re-create it using an *ngIf="showPinchZoom"
wrapper like so:
<ng-container *ngIf="showPinchZoom">
<pinch-zoom>
<image [src]="dynamicallyChangingImageSrc">
</pinch-zoom>
</ng-container>
Using *ngIf
in this manner causes unwanted side effects. Is it possible for the allowable zoom level to update dynamically when the wrapped image src changes? TIA
Note that I have an almost identical problem when resizing the screen. Resizing changes the dimensions of pinch-zoom. Given that pinch-zoom has new dimensions - e.g. it is contained within a smaller div on resize - then the zoom level restriction needs to update to reflect the new dimensions of pinch-zoom but it does not.
Any help with either of these issues? or if these issues are known issues is there any chance of a fix? TIA
Hello, i have similar problems with ngIf, gets wear behavior. I got a blank border after change of ngIf.