Blazor.Diagrams
Blazor.Diagrams copied to clipboard
Expand collapse nodes
Hi, just discovering diagrams and looks interesting. Is there a way to expand or collapse child nodes when clicking on a port ? This would be interesting for large diagrams.
Hello, are you referring to groups?
Hi, Not really groups i think. As i have large diagrams to make it more readable i was more thinking to have a behaviour like this: https://observablehq.com/@d3/collapsible-tree
Hey, I'm afraid that something like that will need to be handled by you. At least for now.
You can easily do this by adding some kind of Children
property to your custom nodes, whenever a link is added you populate that property. You can also add events to your custom node's widget so that when it's clicked, you stop showing all the nodes that are in Children
(using some kind of IsVisible
property for example).
This might be added to this library, but without Tree layouts and stuff, it wouldn't be that great.
Ok thanks for the info. I will try the suggested approach
Okay, let me know how it goes. I'm working on tree diagrams too right now, and I might need this feature. If I do, I might end up adding it to the library directly.
Great to hear you are thinking about that! Would a tree layout or something similar also handle auto-positioning the items?