uber / react-digraph

A library for creating directed graph editors
MIT License
2.62k stars 269 forks source link

How can we detect the click on the arrow head ? #269

Closed Malikx-Alee closed 4 years ago

Malikx-Alee commented 4 years ago

I want to listen when the arrow head of the edge is clicked or when the arrow is moved but not swapped, so that i can perform the required function.

ajbogh commented 4 years ago

That feature is not yet supported. Please feel free to create a PR if you would like to add it. I would suggest following the isArrowClicked function in graph-view.js on line 944. You may choose to add the code in the calling function or somewhere else, however that isArrowClicked function should be part of the solution.

https://github.com/uber/react-digraph/blob/master/src/components/graph-view.js#L944