Modifying links

The LinkConnectionAdorner allows you to modify the link by changing the position and the bound element of the link start and end independently. It calls allowCreateLinkFunction to verify if the modified connection is allowed. The onLinkUpdated function is also called, as described in Creating links, but with some differences in the parameters values:
  • The isNew parameter is false.
  • The undoAction is a ReConnectAction. However, it has the same methods as ConnectAction.

Using the link connection handle

The LinkConnectionAdorner is represented by small circular handles at the start and the end of a link. These handles are highlighted when you hover over them, and can be dragged to change the link position. When the dragging action is performed, it has the same behavior as the ConnectionTargetAdorner in Creating links. The connection is modified when you drop the handle. The new destination port is created in the same way as links are created. When the drop occurs on a connection handle, a basic port is created, but if the drop occurs inside a highlighted node or subgraph, an automatic port is created.