projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.51k stars 1.17k forks source link

Highlight multiple links on mouseover #837

Closed thn80 closed 3 years ago

thn80 commented 3 years ago

For links I would like to add the functionality that some links are "grouped" and whenever one link in the group is selected (mouseover or via mouse click) all links in this group shall be highlighted. As a first start point I'm thinking about a loop which goes through all links of all nodes and checks the options for a "group ID". What is the best way to get a list of all links (of all nodes)? In the dynamic port model there is a piece of code which loops through all nodes. Maybe, this could be re-used to first get all nodes and then all links of the nodes. Do you have better approaches? To keep the architecture of React-Diagrams, should this functionality be located in the LinkModel? Do you have ideas/tipps on the implementation?