Show\hide intermediate node


I have a large diagram with LayeredDigraphLayout layout. Part of this diagram, for example, looks like this:


And there is some node_77 child for nodes 1, 2, 17 and parent for nodes 5, 31,58.

I want my diagram to work in two modes: hide or show node_77.
What is the easiest way to do this? Do I understand correctly that need each time to rebuild the links between these nodes?

Thank you!

No, changing the links is not necessary. Just set or bind the Node.visible property. By default when the visibility of a Node or a Link changes, it will invalidate the layout, causing a layout to be performed again soon.

Oh, and making a Node not visible will automatically make all Links connected with that node to no longer be visible.

And by default layouts ignore nodes and links that are not visible.