Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

How to manually choose a tree's root?

0 votes
First of all: Thanks for this great tool!

I got a mind map which got a natural hierarchy: The central node (the term all the ideas derive from) should be the tree's root. Unfortunately the layouter always chooses a different node as root. I understand that this is smart because it minimizes the tree's depth. But is there a way to tell yEd not to be smart?
in Help by

1 Answer

0 votes
Can you please detail which layout algorithm you're using? Usually, the root node is the node which has only outgoing edges and all of yEd's tree layout algorithms detect and respect that node.
by [yWorks] (26.8k points)
Hi Michael, thank you for your answer!
I used the Layout / Tree Tool; Layout Style "Directed" while allowing general graphs with straight-line connections. Your hint gave me the right direction: After changing the direction of one of the non-tree edges the algorithm found the right root node. Before this change a node with one incoming and four outgoing edges was chosen as root instead of the node with two outgoing edges / no incoming edge.
Best regards from Osnabrück, Philipp
Hi Philipp, I'm glad you solved this problem. Indeed, I haven't thought about what happens for non-tree graphs.
Legal Disclosure | Privacy Policy
...