-
Notifications
You must be signed in to change notification settings - Fork 121
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 the amount of grab pan area beyond the image #62
Comments
If I understand your intention correctly, you wanted to keep the image body within a specified frame while grabbing to avoid part of image goes out of the browser window. There is no option to achieve this right now. We also need to consider the potential UX issue it brings up if we add this option. For example, if an image is already scaled to fit the window, does it respect this option? Would we allow it to even scale further when we grab it? Also, it might look a little bit odd since at some point the image will just stop moving according to our grab intention... |
Not really. The idea is to avoid seeing too much white space, and limiting the amount of pixels the image can travel from the edge of the browser. So this would not conflict with other features I think. I believe it is better to limit this, as the viewer does not need to be able to move the image so much that it goes half outside of his viewable area (just like I did on the attached screenshot). This would improve the user experience even more when the background has transparency and the webpage is visible behind the zoomed image. On the screenshot I have also put red lines to represent how much I can pan (grab) the image and see a lot of white space. The idea would be to be able to limit this and set a smaller distance (the blue lines). |
Ok I got your point now! I'm sure such option could improve the user experience on different image conditions (size and resolution). |
Is there a way to limit the grab pan area?
Possibly with a margin option with the ability to specify the amount in px.
Then the maximum amount of white color one could see from the edge of the image to the edge of the browser would be this margin amount in px.
I have very limited coding experience and do not know how to approach this.
Any help greatly appreciated.
The text was updated successfully, but these errors were encountered: