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 protect the relative structure of a group of nodes?

+1 vote

I am making an argument map using yEd editor.

A critical need is to make a complex argument by joining several dependent claims (co-premises) using a "join" bar.

In this construction, the sequence of co-premises is important, and if the nodes get interchanged, it becomes very difficult to understand the meaning of this sub-group.

I need to tell yEd not to change the relative positions of these nodes; but still follow the other rules like the distance between nodes, edges, layers, etc. and also re-align these nodes while keeping the structure intact.

But when I re-apply the automatic layout, yEd freely changes the placement of these nodes.

Is there a way to prevent this?

  • I tried to manually mode these nodes in a nice layout tand then tried to make a group of these nodes, but it creates the group node around them, which I do not want.
     
  • I wanted a node-grouping as in a drawing editor like PowerPoint, InkScape, etc: Once the shapes are grouped, the entire group gets moved, scaled and deleted together. But their relative position does not change. Also, the group-member shapes appear unrelated on the canvas (there is no outline binding them).
     
  • What logic is used for this sorting? If I know it, probably I can manipulate the sorting order by adding a control factor that is not visible on the canvas.
in Help by (1.5k points)
edited by

1 Answer

0 votes
Well, it depends on the layout algorithm you are using. With the hierarchic algorithm, activating option "Use Drawing as Sketch" will keep the relative positions of your diagram elements.

There is no way to group elements in yEd save by actually putting those elements into a group node. And if you do so, the elements in the group may still be placed individually. yEd does not support the PowerPoint-style or Inkscape-style grouping that you mention in your post. It is possible to simulate such grouping to some extend by e.g. putting the elements in question into a group node, closing the group, and enabling property "Display Inner Graph" of the closed group node. "Display Inner Graph" is only available if you use one of the first three group node styles from palette section "Group Nodes", though.

Finally, the logic for sorting again depends on the layout algorithm you use. The hierarchic layout algorithm first determines the order of nodes in the direction chosen as "Orientation" (by default this would be "Top to Bottom"). Setting "Layer Assignment Policy" determines how the actual strategy for this step. E.g. for orientation "Top to Bottom" and layer assignment "Hierarchical - Optimal", the source node of an edge will (usually) be placed above the corresponding target node. (Usually, because this rule may be violated if the nodes belong to a circular edge path.) After that, the algorithm determines the left-to-right order of the nodes by trying to minimize the number of edge crossings. If you choose an orientation other than "Top to Bottom", the algorithms works the same way but rotates the result in a suitable way.
In short, the structure of your diagram determines the sorting.
Thus, if you do not have circular edge paths in your graphs, you can easily enforce the desired top-to-bottom order through the edges you create.
The left-to-right order, on the other hand, is not easily enforced because the crossing minimization uses techniques based on randomization.
by [yWorks] (160k points)
Legal Disclosure | Privacy Policy
...