Augusto Montagna
Augusto Montagna

Reputation: 11

Can not capture mouseover event while dragging on an svg

What I need is to highlight one circle when Im dragging an arrow over it. While dragging this are the color of the circles: circles now

What I need is stg like this: Target Node highlighted

I tried with d3js mouseover event on the circle, but is not being fired while dragging, and also tried with css rule ( :hover) over the circle with the same results.

Any ideas?

Thanks

Upvotes: 1

Views: 1010

Answers (1)

Dávid Konkoly
Dávid Konkoly

Reputation: 2453

Check this out: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointer-events

If you set the pointer-events parameter of your element you drag to none, then the other elements you hover onto, will trigger the mouseover event.

And when you finish the drag, set the parameter to auto.

Upvotes: 1

Related Questions