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

Specifying the start node in a hierarchical layout in yEd

+1 vote

I would like to use the hierarchical layout in yEd. However, when running the algorithm to layout the nodes, it is selecting the wrong node to place at the top. Is it possible to control which node is placed at the top and then let the algorithm position the remainder of the nodes?

The reason why the algorithm is failing is that the end node has an arrow pointing back to the start node. If I remove the cycle in the graph, the start node will be on top. I would like to be able to maintain the cycle to be able to indicate that the process will start over again and have the start node be on the top.

I am using version 3.21.1 on macOS 10.15.7 if it matters.

in Help by

1 Answer

+1 vote

Unfortunately, yEd does not provide a way to specify which node should be the top-most one in a cycle.

You can try the following workaround though:

  1. Remove one edge from the cycle such that the desired top-most node does not have an in-going edge.
  2. Run hierarchic layout.
  3. Re-insert the previously removed edge.
  4. Run hierarchic layout again, but this time turn on "Use Drawing As Sketch" on tab "General" of the hierarchic layout settings.

The last step should nicely integrate the re-inserted edge while keeping the existing order of nodes.

by [yWorks] (142k points)
Legal Disclosure | Privacy Policy
...