-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enable zooming images #43
Labels
Comments
Also tried https://github.com/spinningarrow/zoom-vanilla.js which is promising, but for some reason the zoomed image is given strange proportions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be good to be able to click/tap an image and have it zoom to be as wide/tall as the viewport allows. Maybe disable on small screens? Or allow zooming in further.
https://github.com/kingdido999/zooming is nice because it does one thing. Doesn't create a "Lightbox" in which you can scroll through several images.
But it doesn't work for us because of the
overflow:hidden
on#window
. The image zooms, but only within the confines of the central article "window". I tried disabling/enabling the overflow when an image opens/closes usingonBeforeOpen()
andonClose()
callbacks… which seemed to work, but closing an image resulted in it bouncing open again, except this time with the overflow in place.Maybe we can look at how that plugin does things and create our own simplified version that works for our one use case.
I think we can target all
img.gu-image
images to get the ones in the body of articles. Could do the same for the "thumbnail" images, but note that they're only 500px instead of 1000px. Looks like you can change the500.jpg
filename to1000.jpg
for them and get the big version though.The text was updated successfully, but these errors were encountered: