Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand collapse nodes #88

Open
jm942 opened this issue Apr 11, 2021 · 6 comments
Open

Expand collapse nodes #88

jm942 opened this issue Apr 11, 2021 · 6 comments
Labels
question Further information is requested

Comments

@jm942
Copy link

jm942 commented Apr 11, 2021

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.

@zHaytam
Copy link
Collaborator

zHaytam commented Apr 11, 2021

Hello, are you referring to groups?

@jm942
Copy link
Author

jm942 commented Apr 12, 2021

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

@zHaytam
Copy link
Collaborator

zHaytam commented Apr 12, 2021

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.

@jm942
Copy link
Author

jm942 commented Apr 13, 2021

Ok thanks for the info. I will try the suggested approach

@zHaytam
Copy link
Collaborator

zHaytam commented Apr 13, 2021

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.

@hypervtechnics
Copy link

hypervtechnics commented Apr 13, 2021

Great to hear you are thinking about that! Would a tree layout or something similar also handle auto-positioning the items?

@zHaytam zHaytam added the question Further information is requested label Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants