I\'m trying to detect mousemove events on partially overlapping SVG elements, as in this image
The great comments here gave me the answer: It's possible to propagate the event to underlying elements manually by finding them using getIntersectionList() at the cursor positon.
$('svg').on('mousemove', function(evt)
{
var root = $('svg')[0];
var rpos = root.createSVGRect();
rpos.x = evt.clientX;
rpos.y = evt.clientY;
rpos.width = rpos.height = 1;
var list = root.getIntersectionList(rpos, null);
for(var i = 0; i < list.length; i++)
{
if(list[i] != evt.target)
{
$(list[i]).mousemove();
}
}
});
Working example: http://jsfiddle.net/michaschwab/w0wufbtn/6/
If the other listeners need the original event object, check out http://jsfiddle.net/michaschwab/w0wufbtn/13/.
Thanks a lot!!