zoomy-plugin icon indicating copy to clipboard operation
zoomy-plugin copied to clipboard

Start on hover

Open alexcroox opened this issue 11 years ago • 5 comments

I'm trying to amend the plugin to work on hover rather than having to click first (a previous click action expands the image area, so I don't want a further click action to enable zoomy)

I've changed most 'click' references to 'mousemove' or 'mouseover' but none seem to trigger zoomy showing until my mouse leaves the image and then re-enters. I'm trying to trigger that same re-enter action without having to leave the image boundaries first (I thought 'mousemove' would accomplish this).

Also what's the best way to "destroy" zoomy, when I click a close button I want to remove clicky from that image so it can be resized and moved out of the way.

alexcroox avatar Jun 19 '13 14:06 alexcroox

I've just noticed you have an event function for that, whoops!

.zoomy('mouseover', {});

However this still does not trigger the magnification if the mouse starts over the image when zoomy is initialised. You still have to move your mouse outside of the image and then back in to start it.

alexcroox avatar Jun 19 '13 15:06 alexcroox

Ahh I see yeah Ill have to see, zoomys initially was setup to work on mouseover, it must have been messed up when fixing some image loading issues. Might need add in a conditional to start the zoom inside of that event handler for the loading.

jcblw avatar Jun 19 '13 15:06 jcblw

OK great, and what would you recommend for removing zoomy from an element?

alexcroox avatar Jun 20 '13 07:06 alexcroox

ok now i remember, i just pull events off of the elements before image was loaded, it was causing all kinds of issues because things were not initialized at that time, ill have to look into attaching an event before then un binding once everything is there.

oh and to kill zoomy https://gist.github.com/jacoblwe20/1365874

jcblw avatar Jun 21 '13 05:06 jcblw

OK great looking forward to that. Thanks for the kill function!

alexcroox avatar Jul 02 '13 12:07 alexcroox