-
Notifications
You must be signed in to change notification settings - Fork 388
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
Zoom limit not recalculated when container resizes #185
Comments
Did you try calling |
Hi @bumbu, I did call resize() but issue is still there. Was using the latest svgpanzoom v3.2.6 on chrome. I found that it is hard to demo the bug using jsfiddle because we need fullscreen for comparison. I made a gist instead: https://gist.github.com/kevinlaw91/82d9b7d0ebf00c2120ca You can download and run in browser, then use inspect element(docked) to trigger window |
I have a similar problem. |
I have a page that automatically adjust SVG container size when window re-sizes. I also set the
minZoom
andmaxZoom
property for svgpanzoom.I opened the page in a small window, when I re-size the window (e.g. maximize), the zoom limit does not gets recalculated uisng the newer, bigger container size. My artwork remain in a very small size even when fully zoomed in.
If this sounds confusing, try to imagine if the original window/container size is 200x200, the artwork is fitted and sized to 200x200 when load. I can zoom for example 200% to 400x400 at max.
When I maximize the window/container to 1000x1000, I expect the artwork can zoom in to become 2000x2000 size, but it doesn't allow me to do so. The artwork is still fully zoomed in at 400x400 in a 1000x1000 container, I cannot zoom in futher.
This is fixed when I reload the page in maximized state. i.e., I can zoom in to 2000x2000 in maximized window with 1000x1000 container
The text was updated successfully, but these errors were encountered: