jackmoore / zoom

jQuery plugin for zooming images on mouseover.
http://www.jacklmoore.com/zoom/
MIT License
1.54k stars 460 forks source link

how to decrease the zoom scale? #131

Open PapaMadeleine2022 opened 6 years ago

PapaMadeleine2022 commented 6 years ago

hello, I feel the zoom scale is too big, So I decrease the magnify value to 0.5, but it seems to not work. Can you give some advises? looking forward to your reply.

jackmoore commented 6 years ago

@IvyGongoogle The magnify value is multiplied by the natural width and height of your image (not the actual displayed size). For example, if you have a 400px image displayed at 200px and use a magnify of 0.5, you end up back at the displayed size (400px * 0.5 = 200px), making it look like it's not working. So you probably want to change your 0.5 value to something between 0.5 and 1.

Sorry, I acknowledge this is confusing. I don't know what I was thinking when I originally set it up this way. I should have based the magnification on the displayed size, but I was probably thinking that I wanted it to be easy for users to display the image at it's natural size.