Multi Flows
Two BlowCanvas instances on one page, each with its own nodes, edges, viewport, selection, clipboard and add-ons - nothing is shared unless the page shares it. Copying a selection from one into the other is a single call on each canvas.
Flow A
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 BlowFlow B
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 the background or scroll in one flow, or use its control bar: only that flow pans and zooms.
- Click a node in Flow A, then one in Flow B: each flow keeps its own selection. Drag or Delete in one and the other is untouched.
- Select nodes in Flow A (Shift+drag the background for several) and press Copy A's selection to B: copies land in Flow B, with the edges between them, and Flow B fits them in view. The other button copies the other way.
- Select a node in Flow A, press Ctrl/Cmd+C, click into Flow B and press Ctrl/Cmd+V: nothing is pasted, because each canvas has a clipboard of its own. Ctrl/Cmd+V back in Flow A pastes the copy there.
How it works
- Each
BlowCanvasis a self-contained instance: its ownNodesandEdgeslists, viewport, selection, measuring and keyboard handling. TheBlowBackground,BlowControlsandBlowPanelinside a canvas belong to that canvas alone, so the two control bars steer different flows. AriaLabelgives each flow a name of its own ("Flow A", "Flow B") for screen readers, instead of two regions both called "Flow diagram".ClipboardShortcutsEnabledbinds Ctrl/Cmd+C, X, V and D on each canvas. The clipboard lives in the canvas, in memory, so a copy made in one flow is not in the other.- The toolbar crosses that boundary on purpose:
source.Copy()returns the selection as aBlowFragment- the selected nodes and every edge between two of them - andtarget.PasteAsync(fragment)adds fresh copies with new ids (a1-copy, ...), offset by the target'sPasteOffsetand selected.FitViewAsync(300)then brings them into view. Copy()with nothing selected hands back whatever that canvas copied last, so the page checks for a selection first.