-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Wrong image size and positioning on "Retina"-screen devices + portrait orientation #1021
Comments
Not quite sure about codepen's involvment, but you need to add meta viewport: <meta name="viewport" content="width = device-width, initial-scale = 1.0"> Works here: |
To be more specific, the image is not taller but scaled to 100% of the screen height, not respecting the This value seems a little arbitrary, is there a way to adjust these settings? |
For now there is no option to disable this, except modifying the default UI JS file. But, I think adding a setting that would allow adjust this 1200 offset is a good idea: return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth; so developer will be able to set it from options |
Sounds perfect! Thx for the quick feedback. |
@dimsemenov Is this an option now? I'm having the same issue on iPhone X with a long image for a client project... |
I've patched my ui js file by overriding |
It seems that there is something wrong with the calculation of the image size on devices with a high pixel density AKA "Retina"-Screens. When I open photoswipe with a portrait image on both an Android Tablet (Chrome on Samsung Galaxy Tab S) and an iPad (Safari iPad Retina iOS 8.1), the image is taller than the screen, overlapping the UI and caption.
Try this demo (open first image):
http://s.codepen.io/superstructure-net/debug/GpzWjP
However I cannot reproduce this in desktop browsers...
The text was updated successfully, but these errors were encountered: