jackmoore / zoom

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

Magnify Values #63

Closed manatarms closed 10 years ago

manatarms commented 10 years ago

Hey, Was wondering what the acceptable values for magnify are. Is 0.2 an acceptable value. Is it possible to reduce the zoom factor to where it is less than the original image. I know this is the opposite but was just wondering.

Thanks for your time, Cheers

jackmoore commented 10 years ago

Haha, yes, you can reduce the zoom so that is smaller than the original image. I wasn't sure what would happen, but it seems to function fine.

The magnify value is just multiplied against the real width and height of the image. So the default value being 1 is 100% of the natural size of the image, and 0.2 would be 20% of the natural size. So if your full sized image was large enough in comparison to your target element, then it would be reasonable to use a value less than 1 for magnify. Because this might be hard to predict, I should probably limit the minimum size to be 100% of the target.

jackmoore commented 10 years ago

Added a better description of the property to the website.