jackmoore / wheelzoom

A small script for zooming IMG elements with the mousewheel/trackpad.
http://www.jacklmoore.com/wheelzoom
MIT License
342 stars 95 forks source link

Restores default scrolling action onReset #4

Open clonemeagain opened 10 years ago

clonemeagain commented 10 years ago

When zoomed all the way back out, allows user to return to known work-flow of scrolling down the page. Scrolling up will still trigger as normal. Tested.

Also means that an image won't block a normal scroll use of the page when user isn't interested in zooming, but the image happens to be beneath the mouse (downwards scrolling had no effect on page when image was beneath cursor). Change only uses API function: http://api.jquery.com/scrolltop/

60 is in pixels, so needs to be enough that it doesn't affect the normal use of the wheel.

jackmoore commented 10 years ago

Thanks. I think this is a good suggestion, but I don't really care for the way it's being implemented (no offense intended!). I think it was a bad idea on my part to tie to the normal onscroll, rather than having to activate it in some way (such as with a click or focus).