igorlino / elevatezoom-plus

Enhanced elevateZoom - A jQuery image zoom plugin
http://igorlino.github.io/elevatezoom-plus/
MIT License
162 stars 78 forks source link

LensContainer width problem - Lens is very wide and out of bounds on small resolution image #92

Open cAstraea opened 6 years ago

cAstraea commented 6 years ago

Hello Having a problem with the lens. Usually working on images with high res such as 3306 x 4678 and had to manually set the zoomLevel to zoomLevel: 6.588732394366197 to see the preview zoomed out. On smaller res image this zoomLevel causes problem with the lens overflowing and the preview looking messed up? Is there a way to set an auto zoom level to allow full width viewing ? image

igorlino commented 6 years ago

What about reinitializing the plugin differently for smaller images ?

cAstraea commented 6 years ago

Thanks , ended up checking for this.naturalHeight of the pictures

zoomLevel: (this.naturalHeight < 1000) ? 1.2 : 6.588732394366197