strawdynamics / luminous

A simple, lightweight, no-dependencies JavaScript lightbox
BSD 2-Clause "Simplified" License
776 stars 70 forks source link

Small viewport sizes don't scale the image properly #587

Closed dijkermans closed 2 years ago

dijkermans commented 2 years ago

Hi,

I think you should disable below css because it 'cuts off' images and you have to scroll/drag horizontally and vertically to see the entire image. Especially in portrait mode it looks really odd and I think nobody expects this behavior.

@media (max-width: 460px) .lum-lightbox-inner img { max-width: none; max-height: none; }

I understand if the entire image is shown on small viewports, especially in portrait mode, the lightbox image won't be much enlarged, but I think it's still better than your approach. Looks like it's done on purpose but I consider it as a bug.

luminous 2.3.5 - your demo win10+chrome v97 | edge android+chrome

Regards lum

frederickfogerty commented 2 years ago

Hi @dijkermans, thanks for opening this issue. I have just tested this on my phone, and personally I think this is a good experience, but I will bring this up with my team to get a second opinion.

dijkermans commented 2 years ago

Hi, thanks, the problem is that you don't know what image to expect in case you browse through many images like a gallery. You could add a thumbnail below the zoomed version if you like. But I'm sure most people like to see the entire image first and then maybe zoom in if they want to see more details. That's how it works on most phones and with most lightboxes. If you want to do it different then I'd suggest making it an option, or improve the usability by adding a thumbnail or zoom-out button.

Thanks.

frederickfogerty commented 2 years ago

Hi @dijkermans, thank you for your detailed suggestions. At this stage, our team is content with the functionality of this component, so will not be considering altering the functionality. We're also welcome to more suggestions or feedback at any time, so please let us know if you encounter other issues in the future. Thanks!