I'm testing animations with Snap.svg on hover in/out and on click with an SVG illustration I created and exported with Illustrator.
I have a group that includes others sub-groups. On hovering the parent group, some child groups are animated with Snap. The problem is that the hover event triggers on entering the parent group, but the hover out triggers when hovering the children groups, resulting the animation to stop, or start again, or going back to initial state.
The structure of my svg groups is the following :
--the 'renard' group
----the 'tete' groupe
----the 'bras_gauche' group
----the 'bras_droit' group
----the 'queue' group
I tried using the elm.attr({pointerEvents: "none" });
(see here) but it doesn't work. It desactivate totally the hover triggering on my parent group.
The result is here : http://codepen.io/Hugo8705/pen/zGVxPL
I achieved to get the desired effect using a transparent rectangular hotspot above the fox, but the hotspot doesn't exactly fits the fox shape : http://codepen.io/Hugo8705/pen/ZGdYOX
I hope it's clear enough, I really don't know how I could fix that problem. Maybe it's the configuration of my mark up that's not good.
Thank you for your help,
Hugo