Canvas: Attach edges to center of node

Use case or problem

When rearranging nodes in the canvas, sometimes the arrows wind up on the “wrong” side (e.g. when the positions of nodes A → B have been swapped horizontally to B ← A). The result is edges awkwardly crossing over their container until the user manually moves the edge’s attachment point from one side to the other.

Proposed solution

In addition to providing attachment points on the top/bottom/left/right sides of a node, also provide an attachment point in the direct center of the node. If an edge is attached to this point, the arrow must be rendered behind the node, so that it does not obscure the node’s contents (or alternatively, just calculate the rendered end of the arrow to be the intersection point of the arrow with the node’s boundary).

Current workaround (optional)

Manually rearrange arrows after rearranging nodes.

Related feature requests (optional)



I agree! You may like these requests: Option to toggle on dynamic canvas node anchor connections and Dynamic connection line anchoring for canvas groups