Reconnect Edge
A selected edge shows a dot at each end; drag one onto another handle and the edge is rewired in place, keeping its id. OnReconnectStart, OnReconnect and OnReconnectEnd report the gesture - the last one says whether it rewired anything, the usual cue to delete an edge dropped on nothing.
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
- Click the edge labelled drag my ends: a small dot appears at each end.
- Drag the dot at B onto the top dot of C or D: the edge now ends there, and the log shows the start, the new wiring under the same id, and an end that rewired it.
- With the edge selected, tick Show grab area and move Grab radius: the shaded circle round each dot is how close the pointer has to come to pick that end up, the same on screen at any zoom.
- Click the edge labelled Reconnectable = false: no dots appear, so its ends stay where they are.
- Drop an end on the empty pane: the edge stays as it was and the log reports an end that did not rewire. Tick Delete an edge dropped on nothing first and the edge is removed instead - but press Escape in the middle of a drag and it is kept, since giving up is not a drop.
- Untick Edges reconnectable: no edge shows its dots any more.
- From the keyboard: Tab to the edge and press C to pick up its target end (C again for the source end), Tab to another node and press Enter to attach it, or Escape to give up.
- Reset puts both edges back as they started.
How it works
- The end dots show on a selected edge when
EdgesReconnectable(on by default) and the edge's ownReconnectable(true by default) both allow it; selecting needsElementsSelectable. ReconnectRadius(10 by default) is the radius, in screen pixels, of the invisible circle round each dot that picks it up; the checkbox paints thebit-blow-edge-reconnect-hitcircle that draws it.OnReconnectStartreceives aBlowEdgeReconnectStart: theEdgeand itsMovingEnd, the end being moved (SourceorTarget).OnReconnectreceives aBlowEdgeReconnect: theEdge, already rewired in place with itsIdunchanged, and the newConnection.OnReconnectEndreceives aBlowEdgeReconnectEndwhichever way the gesture ended:Edge,MovingEndandRewired.Rewiredis false when the end did not attach - dropped on the pane or on a handle that refuses it, or abandoned with Escape.OnConnectEndfollows it for the same gesture, withIsReconnectset; itsIsDroppedis true only for a real drop, so the page deletes an edge that did not rewire only whenIsDroppedsays it was let go on nothing, not when the gesture was cancelled.- Every connection rule applies to the moved end as it does to a new connection; dropping it back where it came from is allowed, since the edge does not count as a duplicate of itself.