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 do I set the position of handles for edges?

0 votes
I have imported some SVG symbols.  The edges do not attach where I want them, ending up somewhere in the label, or only at the top.  Is there a means to ensure that edges attach to the closest point, or somewhere on the perimeter?  I do not see any sort of setting for this.
in Help by (190 points)
edited by

1 Answer

0 votes

To set the connection point of an edge at a node (technically called a "port"), select the edge and adjust its "Source Port X", "Source Port Y", "Target Port X", and "Target Port Y" properties in the properties table in yEd's lower right corner.

Note, there is a difference between the coordinates of the port (which can be set using the above mentioned properties) and the visual conenction point of the edge. If the port lies inside the corresponding node, the edge path is clipped at the node boundary:

 

Additionally, the clipping behavior of SVG nodes that determines the visual connection point can be changed using the SVG node's "Clip on Outline" property:

 

by [yWorks] (160k points)
Ah, nodes, edges, and ports!  You use the DAG terminology, OK.  By modifying the properties of an edge, I can place it where I want it, though clippiing to the outline doesn't seem to work as expected (edge head/tail still inside the node somewhere).  Can I modify the node template so that any new edges connect to the center of the node, and are clipped at the outline?  I would like my custom nodes to act like the shape nodes, rather than "hard wiring"each edge.

Re:

Can I modify the node template so that any new edges connect to the center of the node, and are clipped at the outline?  I would like my custom nodes to act like the shape nodes, rather than "hard wiring"each edge.

There is no setting for node and/or edge templates that determines where new edges start at a node.
New edges connect to the center of a node by default. If you press and hold SHIFT before pressing the left mouse button to start edge creation by dragging the mouse from an existing node, the edge will start at the mouse position instead of the center of the node.
Moreover, clipping at the outline is the default for SVG nodes.

If edge creation does not work as described above, please consider uploading a screen shot of a (selected) new edge and screenshots of all your preference settings. Maybe that information can shed some light on your issue.

Legal Disclosure | Privacy Policy
...