thdoan / magnify

A lightweight jQuery magnifying glass zoom plugin.
https://thdoan.github.io/magnify/
MIT License
243 stars 63 forks source link

changing magnifiedWidth/Height causes image in lens to move out of view #48

Closed candlefish closed 6 years ago

candlefish commented 6 years ago

I have a function that allows the user to adjust the zoom using the mouse wheel - it updates the magnifiedWidth and magnifiedHeight properties. The magnify-lens bg-size property updates on the fly, but the background position does not, so the image in the lens moves diagonally out of view when increasing the zoom. Simply moving the lens a tiny bit causes the background position to update correctly, but it would be nice if it would update while the bg-size is being changed.

thdoan commented 6 years ago

Thanks for reporting. This has been fixed and will be added to v2.3.2 release.