blackears / svgSalamander

155 stars 56 forks source link

mouse click listener on SVGElement? #50

Closed robertaecosta closed 4 years ago

robertaecosta commented 4 years ago

Hi,

We have been using SVG Salamander for a while and it works great, thanks a lot! However, I have been requested to upgrade our SVG Panel to respond to mouse click on some elements. Would that be possible with SVG Salamander?

This is probably not the proper channel to be asking this kind of support, sorry about that.. if there is such a channel, could you please redirect me?

blackears commented 4 years ago

This is probably the most appropriate place for now. This project doesn't get much traffic.

SVG Salamander does have support for picking. Just implement a method to detect mouse clicks on your panel and then call one of the SVGDiagram.pick() methods to get a list of all svg shapes in your pick area.

robertaecosta commented 4 years ago

I'll try that, thanks a lot