fxgraph icon indicating copy to clipboard operation
fxgraph copied to clipboard

Childless node won't stay on selected level.

Open aserafim19 opened this issue 5 years ago • 2 comments

Hey there,

First of all, thank you so much for your work on fxgraph! I was wondering if you can tell me how to modify the code so that a childless node can stay on any level instead of just on the most-bottom level?

For example: In my second level here, the node on the left has 2 children whereas the node on the right has 3. image

As soon as I remove the 2 children of the left node, the graph transforms into this: image

I would like for that left node on the second level to remain on the second level with the right node and for the 3 children of the right node to remain on the third level, like so: image

Would this be possible? Any help and advice you can give is greatly appreciated. Thanks again!

aserafim19 avatar Jul 06 '19 10:07 aserafim19

Yeah I had come across the same issue. I used https://github.com/abego/treelayout for the graph layout, but it looks like I'll have to create my own. I'm rather busy with work and life atm, so unfortunately it won't be soon

sirolf2009 avatar Jul 10 '19 08:07 sirolf2009

Curious, how are you handling node removal?

When I remove nodes I get an IllegalStateException. I don't see any examples of how to remove nodes, so I may just be using the library incorrectly.

Col-E avatar Feb 27 '20 19:02 Col-E