Cancel Connection
A connection in progress can always be abandoned - Escape while dragging, or a click on empty canvas when connecting by clicks - and OnConnectEnd tells every way a gesture can end apart: connected, refused by a handle and why, dropped on empty space, or cancelled.
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
- Drag from the handle under the top node and, before letting go, press Escape: the line disappears and the log says the gesture was cancelled.
- Drag again and release on empty canvas: dropped, nothing connected. Release on the top handle of "Target" to connect.
- Release on Target's bottom handle, or drag the same connection a second time: a handle refuses it, and the log shows the reason the canvas announces to screen readers.
- Tick Click to connect, click a handle and move the pointer: the line follows it. Click another handle to connect, or click empty canvas or press Escape to cancel. Clear log empties the list.
How it works
OnConnectStartraises aBlowConnectionStartInfo-NodeId,HandleId,HandleType- when a connection starts.OnConnectEndis raised exactly once for every start, however the gesture ends, with aBlowConnectEndInfo. This page sorts the endings by its flags:IsValid(it connected), thenRejection(a handle refused it, and why), thenIsDropped(released after a real drag on empty space); what is left was cancelled.- Escape cancels whatever gesture is running before it would clear the selection, so a connection being dragged ends with
IsDroppedfalse and nothing connected. ConnectOnClick(off by default) makes connections by clicking one handle and then another; a click on empty canvas or Escape cancels the pending one.- The reason text comes from
BlowAriaLabels.Default.ConnectionRejected(rejection), the sentence the canvas announces to screen readers when a drop is refused; set the canvas'sAriaLabelsto reword or translate it.