henrygd / bigger-picture

JavaScript lightbox gallery for images, video, audio, iframes, html. Zoomable, responsive, accessible, lightweight.
https://biggerpicture.henrygd.me
MIT License
231 stars 17 forks source link

Is it possible to zoom in larger than image's width and height? #39

Closed razonyang closed 10 months ago

razonyang commented 10 months ago

Hi, I'd like to zoom in the image to larger than it's width and height, is there an option for this? I've tried the maxZoom option, but seems not for this purpose.

henrygd commented 10 months ago

You should be able to do this by passing in a larger width and height. Multiply them by 1.5 or whatever you like.

maxZoom restricts the maximum zoom level based on the starting image size, mainly for restricting zoom level on smaller devices. The default is 10, for 10 times the starting size, but you can increase that as much as you want.

Let me know if you want a stackblitz example.

razonyang commented 10 months ago

You should be able to do this by passing in a larger width and height.

Aha, didn't think about this, thanks a lot, will give it a try later.

razonyang commented 10 months ago

Thank you, it works.