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
lost zoom position on click with preserveViewport = true #1117
Comments
found autoResize:false, so i think it something related that i resize the div in 50% but did not find a solution for that |
You might have to listen for additional events, like the And you might have to do some compensation if the two viewers aren't the same size... is that part of what's going on? |
the 2 viewers are in the same size 50% side by side , |
Regarding the open event I was thinking something like this:
You shouldn't need to do anything extra on click, since the zoom and pan events should already cover it. I'm having a hard time visualizing the scenario where things are breaking. Can you share a link to your code, or maybe a simplified version that shows the problem directly? You can fork my Codepen if you'd like, for instance. |
@iangilman hi i opened a new issue with all the details , can you help me there ? the codepen is : |
Hi .
regrading the following issue
#1105 that.
when I upload my code I have the following code block to keep the zoom on 2 images :
that is work and both image working great together but somthing else with the keep zoom went wrong.
I have a button to show and hide on of the image, but in each click of the button i lost some of the zoom event i added preserveViewport = true; in each click or without it
so when i click the button i gout the second image and both are got the zoom, but after i click the hide button in the first click everything is ok but if I continue to show and hide the zoom is not at the same point. after 3 or 4 click the zoom return to the start point.
onclick i have the following code
also i have css that i perform on click that divide the div to be 50%(each image is 50%) to show 2 images side by side side so i think maybe its related to css, but how can we keep the zoom event we change divs or with of divs ?
thx for the support
The text was updated successfully, but these errors were encountered: