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

Round edges from node to same node

+2 votes
For a finite state machine I want to create transitions which start and end at the same node. I want those edges to have a nice, round shape, but when I am using the rectangular edges (sorry, using the German version, so I'm just guessing its English name) to draw the edges it usually ends up messy.

Now, by accident I managed to make the edge nice and round by holding the mouse button, drawing the edge away, then leading it back with an additional click, but I couldn't manage to repeat that - now it just ends up being one line leading away and coming back without any curve at all!

I'm thankful for any help you could throw my way.
in Help by
reopened by
I have the same issue. So what's a "corner-y" edge?

"Corner-y" means the default polyline edge style, i.e. one of the first two edge templates in palette section "Edge Types".
To create a round self loop with a polyline edge, move the mouse over the node, press and hold the left mouse button, drag the mouse out of the node, then drag the mouse back inside the node, and finally release the left mouse button.

I'd just like to add this solution only works if you're using one of the polyline edge types, it doesn't appear to work for any curve edge types.

1 Answer

+1 vote
I also want to do this, but I need control over where the edge exits and enters. In particular, on a flow chart, it is awkward to have it on top of a node. Is there any way to do this, say, to have the edge exit at (w, 0.2h) and enter at (w, 0.8h)? w=width, h=height of node, (0, 0) at lower left, (w, h) at upper right.
by

Well, it is possible to control enter and exit points for selfloops. However, it is currently a bit ackward to do so. Anyways, here is what you need to do:

  1. Create a selfloop as explained in the comment to the original question and click on it to select it.
  2. Go to the properties view in yEd's lower right corner and find the "Ports" section. It has the entries "Source Port X", "Source Port Y", "Target Port X", "Target Port Y".
    Set the ports to the desired coordinates. Since ports are relative to node center, your desired exit location means "Source Port X" equal to 0.5 * width - 0.5, "Source Port Y" equal to 0.3 * height, "Target Port X" equal to 0.5 * width - 0.5, and "Target Port Y" equal to -0.3 * height. After that the selfloop will exit and enter at the bottom right.
  3. Now drag selfloop's single bend to the right until exit and enter points match source and target ports.

Sample graph.

 

Legal Disclosure | Privacy Policy
...