-
Notifications
You must be signed in to change notification settings - Fork 296
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
Limit boundary to image max? #105
Comments
Is this your problem? Is this what you want? |
Close, but no cigar. I need the limits of the boundaries to be the max of the ratio of height or width. In the codepen you posted, it's limited to the size of image, rather than the size of the div. It is definitely one step closer to what I am looking for. |
Can you post a codepen of what you have and I will get you where you want to go? I'm not understanding "limits of the boundaries to be the max of the ratio of height or width". |
https://codepen.io/anon/pen/dEdqBR Say I need the image to be size of a div that's 500x500 and the image itself is 3000x5000. |
The autocenter() function draws it perfectly. Also, unrelated issue but it seems that there is something wrong with the animate() function when you use scroll wheel. I've noticed the same issue when using smoothZoom. It will get hung up on the animation and cause stuttering effects when used in quick succession. |
Is this what you're looking for? Just a matter of CSS for that change. |
@kuzziemon you'll probably have to call the kinetic.cancel() function before using any animate functions to prevent that from happening. Look in the source code. |
I see, thanks for your help. |
@kuzziemon What library did you go forward with? |
@kuzziemon what library did you use? |
The only one I could find is this one - https://fancyapps.com/docs/ui/panzoom/ |
Is it possible to limit zoom and pan to the image resolution?
I want to be able to zoom in and pan as if the boundaries are that of the image itself.
I've tried tinkering with the bounds option to no avail, so if I'm missing something blatantly obvious, please correct me.
The text was updated successfully, but these errors were encountered: