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

The port constraints do not work for manually created edges

0 votes

HI

I wanted to create a organization chart manually, like this:

But when I tried making it, only the first edge got created as desired. But all subsequent edges came out of the right side of the yellow node, and went through the intervening nodes to land on the top side of the green node. (see illustration below)

So I used the port constraints to set the outgoing edges to connect to any node from bottom side and incoming edges to connect to any node through its left side.

(although the Act on drop-down list is set to "all ports", I had selected all nodes before using this command.)

But this does not have any effect on the new edges I created. The diagram behaves just as before.

Do these constraints work only when the diagram is subjected to a layout command? If so, it should work when we create new edges manually.

in Feature Requests by (1.5k points)

1 Answer

0 votes
 
Best answer
Port constraints are meta data that is only taken into account by some of yEd's layout algorithms. Interactive editing does ignore port constraints completely.

I suppose you had "Orthogonal Edges" enabled when creating the subsequent edges in the above illustrations. In this case, you can switch the order of horizontal and vertical edge segments if you have not yet created an explicit bend. E.g. in the above case your subsequent edge has a horizontal segment followed by a vertical segment. If you press and hold SHIFT, then move the mouse slightly to the left, the edge preview will change to a vertical segment followed by a horizontal segment.

As an alternative to manually creating orthogonal edges, try "Layout" -> "Edge Routing" -> "Orthogonal/Polyline". This algorithm is one of the algorithms that respect port constraints.
by [yWorks] (161k points)
selected by
Yes, the "orthogonal edges" mode was enabled (by default).

Actually I was not aware of many features like this at all, because the help file does not explain these finer controls that are so useful in manually drawing the diagram just the way we want.

I will be adding a chapter in my User manual to describe these tricks.
Legal Disclosure | Privacy Policy
...