BartBrood / Interactive-Graphviz-Diagrams

Dynamic Graphviz graphs with collapsible cluster/expandible clusters and edge highlighting through user clicks.
MIT License
6 stars 1 forks source link

Request features to hilight the whole adjacent edges #5

Open ray-ronnaret opened 1 month ago

ray-ronnaret commented 1 month ago

Your work is awsome and very usful. Currently, the code hilith only one node, is it possible to have a feature to hiligth the whole edges of the selected node?

BartBrood commented 1 month ago

Thanks for the compliment. Can you be a bit more specific, or provide your dot source code? When clicking on a node, the current code should highlight the node itself and all the edges connected to that node. If that is not the case there is a bug. Are you using the html or the svg version? the code for svg takes into account the dges with or without arrows (graph or digraph). The html version relies on the parsing of the graphlib-dot to identify the edges.

ray-ronnaret commented 1 month ago

Thank you for the quick reply, very appreciated.

I use the html and when click a node, it hilight only one level. This is the output when clicke a node PLUS_INTERFACE current

And this is what I would like if possible, click a node PLUS_INTERFACE, this is Graphviz Interactive Preview (Visual Studio Code Extension). You can see it hilight the whole path. expect

BartBrood commented 1 month ago

Hi, issue understood, i will have a look if i can implement a right click menu to do either the current behavior or the full path highlighting. I will be able to use the graph.predecessors and graph.successors functions of graphlib to walk the path .(https://github.com/dagrejs/graphlib/wiki/API-Reference#graph-api).

i also want to keep the current behavior as in most of my graphs, which are application architecture related, i am showing interfaces for applications as edges , not all paths are related to each other. e.g. a systems exposing and consuming API's on different data objects for different user stories.