Is there a straightforward way to get a reference to the dom element of a component inside an event handler? It's dirty I know...
I have a component wrapping an
<svg> and am implementing pan and zoom events on the svg. Mouse events performed on children of the svg (such as shapes in the image) have a
e.target value of the child, not the parent svg element. But I need a handle on the svg dom element to call
I’ve solved this and a have working solution. If someone interested -> PM
@selfsame that assumes the target is a direct descendent of the svg, which it often isn't. I suppose I could just walk up the elements until landing on svg, but I figure there might be a cleaner way
ah then you'll have to walk the tree or use a
ah right makes sense thanks