mstefaniuk / graph-viz-d3-js

Graphviz web D3.js renderer
MIT License
313 stars 38 forks source link

This framework can respond to node mouse events? If can, how to use? #27

Open hzy729 opened 7 years ago

hzy729 commented 7 years ago

This framework can respond to node mouse events? If can, how to use?

mstefaniuk commented 7 years ago

Currently there is no way to receive mouse events. What do you mean by respond to?

hzy729 commented 7 years ago

respond to mouse Click ,for example :click a node , jump to a url for get info .

mstefaniuk commented 7 years ago

URL on node is supported by Graphviz format itself but not supported in my online version. It can be fixed quite quickly. Do you find any other usages of click handlers than following a link?

PEZO19 commented 7 years ago

+1 Would be nice to merge (mouse) selected nodes into a big one, and after click on big node it would expand to its original parts. Is it hard to do with current setup? I'd like to help to create this feature.

mstefaniuk commented 7 years ago

@PEZO19 This graphviz renderer generates final result from dot source using viz.js. If you want to hide several nodes into one it can be achieved using only by modification of original dot source. We can consider one simplification that hidden nodes must be already grouped in subgraph and then rendering will replace subgraphs with a node and then clicking on a node will re-render stage with hidden content.