You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the only parameter to adjust the vertical position of the box is:
positionFromTop The distance from top of viewport that the Lightbox container will appear, in pixels.
This is a very poor positioning scheme. I understand its simplicity of implementation but it is too limited. There should at the very least be
the possibility to set a percentage (relative to the height of the viewport)
the possibility to center the image vertically (and set a minimum top/bottom margin in px) rather than having a fixed top margin.
There might be richer and more elaborate models (or perhaps simpler but more powerful ones), these are just out of the top of my head.
When the screen is much bigger than the image, a small value of positionFromTop is ugly. On the other hand, on small screens (e.g. mobile devices) a large value wastes a lot of space and keeps the image unnecessarily small. So, a fixed top value is clearly an insufficient scheme.
The text was updated successfully, but these errors were encountered:
I was just looking for a solution for this. I tried centering by setting display:flex on #lightbox but that won't work since the container has two children which are supposed to be on top of each other. If the container had one extra wrapper this could be easily achieved.
On a mobile touch device (iPhone 6, IOS 10.2.1, in the Safari browser):
On a long page with many images further down below, viewing an image requires to scroll all the way up to the top of the page to view this image(s) because it is not shown relative to the actual position on the page but at the absolute top (on the iPhone). Do I miss a parameter or is there a way out?
Thanks for the great script and your help, BR, kess42
Fix for the mobile issue that caused the scroll to the top behavior will be out shortly and is in the dev branch. PR: #650
^ Does not address the original request from this issue. Lightbox2 is in maintenance mode so the added flexibility for vertical positioning is not planned but is something I will consider for a potential v3.
It appears that the only parameter to adjust the vertical position of the box is:
This is a very poor positioning scheme. I understand its simplicity of implementation but it is too limited. There should at the very least be
There might be richer and more elaborate models (or perhaps simpler but more powerful ones), these are just out of the top of my head.
When the screen is much bigger than the image, a small value of
positionFromTop
is ugly. On the other hand, on small screens (e.g. mobile devices) a large value wastes a lot of space and keeps the image unnecessarily small. So, a fixed top value is clearly an insufficient scheme.The text was updated successfully, but these errors were encountered: