Connection Mode
ConnectionMode decides which handles may be joined: Strict, the default, only joins a source to a target, while Loose lets any handle connect to any other - a source to a source, a target to a target. Use Loose for undirected diagrams where a handle is just a connection point.
Press Tab to move between the nodes and edges of the diagram.
Press Enter or Space to select it, Shift with Enter to add it to the selection, the arrow keys to move the selected nodes, Delete to remove them and Escape to clear the selection. Press C to start a connection from it.
Press Enter or Space to select it, Delete to remove it and Escape to clear the selection. Press C to move its end to another node.
bit BlowTry it
- In Strict mode, drag from Node 1's right-hand (source) handle: only the other nodes' left-hand (target) handles turn green. Release on another node's right-hand handle and nothing is connected; the line beside the toolbar says why.
- Release on a left-hand handle instead to connect. Dragging the other way, from a target to a source, works too: the edge still runs from the source.
- Switch Mode to Loose and drag from a right-hand handle again: every handle on the other nodes turns green, and a source dropped on a source connects - so does a target on a target.
- Switch back to Strict: the edges strict mode would not allow are removed, since this page keeps only what its mode permits. Remove edges clears the rest.
How it works
ConnectionModeon the canvas isBlowConnectionMode.Strictby default: two handles of the same type are refused with theRejectionSameHandleType, reported byOnConnectEnd.BlowConnectionMode.Loosedrops that rule; the others - no duplicates, no self-connections, yourIsValidConnection- still apply.- The new edge runs from the handle the drag started at when that is a source, and towards it when it is a target, so a target dropped on a target makes the dropped-on node the edge's
Source.OnConnectreports the resultingBlowConnection. - In Loose mode an edge can name a source handle as its
TargetHandle; the canvas then looks for the handle among both types to anchor the edge. A strict canvas does not, which is why this page removes such edges inModeChangedwhen you switch back. - The handles' colours come from this page's
cm-sourceandcm-targetclasses, which set--bit-blow-handle-bg; while a connection is dragged the canvas's green and red take over.