How to identify individual path objects in raphael.js?

18 Views Asked by At

I'm trying to do something that seems like it should be simple, but I don't know how and I'm not sure if I can describe it correctly. I've tried searching and haven't found quite what I'm looking for. I've drawn a series of hexagons in raphael.js. Each one has a title so displays coordinates when I hover over the element, but setting an id attribute doesn't seem to work. I need to know which object the mouse is over and set up a click function based on that information. I tried getting the number of children for the DIV in which the paper resides, but I only get one, which I kind of expected, the single SVG. I don't know how to get the number of children within that SVG or how to identify which one I'm trying to select. When clicked, I need to create a new element in a different DIV, based on the properties of the object I clicked. It's basically a map grid for which I need to create a zoomed-in version of that hexagon.

0

There are 0 best solutions below