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

Placing the node at same layer or higher

0 votes
Hi! I am building a graph where some nodes are "linked" to others, meaning they can be lower or at the same level. In addition, each node should be as high as possible(topmost). Double arrow(edge) means exactly same level, and single edge - exactly lower, both sometimes resulting in lower than possible positioning)

 

Is there easy way to use linked nodes in hierarchical layout&
in Help by

1 Answer

0 votes

The hierarchical layout already orders nodes depending on their connections (and the chosen layout orientation). However, forcing connected nodes onto the same layer (which is the technical term for a "level") is currently not easy. The simplest way is probably a two-pass approach:

  1. Run the hierachic layout algorithm with option "Selected Elements Incrementally" and "Use Drawing As Sketch" on tab "General" disabled and option "Arrows define Edge Direction" on tab "Edge" enabled.
  2. After the layout algorithm is finished manually adjust the positions of the same layer nodes. You only need to place those nodes roughly at the desired position.
  3. Run the hierarchic layout algorithm once more, but this time with "Use Drawing As Sketch" enabled.
by [yWorks] (160k points)
Legal Disclosure | Privacy Policy
...