lity icon indicating copy to clipboard operation
lity copied to clipboard

pinch to zoom

Open axeff opened this issue 9 years ago • 5 comments
trafficstars

Viewing an image where you need to use pinch to zoom gesture for more detailed view seems impossible.

img_0017 img_0018

axeff avatar Jan 29 '16 09:01 axeff

Yep, this isn't ideal atm. sorry. It's on my todo-list...

jsor avatar Jan 29 '16 14:01 jsor

There are two workarounds to support better zooming of images:

  1. Make the underlying content non-scrollable:

    .lity-active,
    .lity-active body {
        overflow: hidden;
    }
    
  2. Use a plugin to allow zooming of the image, eg. jquery.panzoom

    $(document).on('lity:ready', function(e, lightbox) {
        lightbox.find('img').panzoom();
    });
    

jsor avatar Feb 01 '16 09:02 jsor

.lity-active,
.lity-active body {
    overflow: hidden;
}

Why is this not part of the default CSS ? It seems useful to remove scroll bars to allow more space for large (wide) images and to prevent scrolling issues with inline and iframe content on iOS mobile devices.

RavanH avatar Jul 07 '18 12:07 RavanH

I might consider this for the next version. 👍

jsor avatar Jul 07 '18 20:07 jsor

It disables background scrolling too, which seems to bother some people...

RavanH avatar Jul 07 '18 21:07 RavanH