Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamically changing image size and/or window resizing does not adjust zoom level restriction on ivy-pinch-pro-1.4.0 #100

Open
danday74 opened this issue Dec 22, 2021 · 1 comment

Comments

@danday74
Copy link

danday74 commented Dec 22, 2021

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

@danday74 danday74 changed the title dynamically changing image size does not adjust zoom level restriction on ivy-pinch-pro-1.4.0 dynamically changing image size and/or window resizing does not adjust zoom level restriction on ivy-pinch-pro-1.4.0 Dec 22, 2021
@miguel2211
Copy link

Hello, i have similar problems with ngIf, gets wear behavior. I got a blank border after change of ngIf.
7B551A34-3B5E-4639-8BD0-D4352F2BC11B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants