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

Make YEd select the right node as the root when using directed Tree Layout

0 votes
Hi there,

I've been using yED now for some days. At work, we build a giant tree that is actually not a strict tree. For now, everything worked fine. We used Layout -> Tree -> Directed to layout the tree with the default settings except that we enabled Directed -> Orthogonal Edge Routing.

Now, we've added only one node and yEd now picks another noode as the root. I've already searched this Q&A and I found that there could be an edge bottom to top causing the trouble, so I verified that all edges are going top to bottom.

Now, when we remove that node we've added and execute the directed tree layout, Everything returns to normal.

I cannot use hierachical layout since this layout engine changes the aging of the siblings and I must not change that.

So how can I force the tree layout engine to pick that specific node as the root? Or is there any other layout engine that could do the job?

Thanks for helping,

vat

Edi: I could fix it by making the tree a strict tree
in Help by
edited

1 Answer

0 votes

Unfortunately, it is not possible to specify the root node for tree layouts.

Maybe the following approach will work for you, though:

  1. Arrange your tree without the additional node as a directed tree.
  2. Add the new node and place it roughly at the desired location.
  3. Run hierarchical layout with option "Use Drawing As Sketch" on tab "General" enabled. (This setting forces the hierarchical algorithm to keep the existing order of elements.)

 

by [yWorks] (134k points)
I tried hierarchical layout already before posting the question and it layouted branches where each node only had one child in a very strange way.

I could fix it by making the tree strict. (No node having two or more parents)

Thanks anyway for your help. :)
Legal Disclosure | Privacy Policy
...