Skip to content

Touch Device

Every gesture is built on pointer events, so dragging nodes, panning, connecting and pinch-zooming work with a finger as they do with a mouse. The toolbar covers what a touch screen lacks: no Shift key to box-select with, and handles small enough to miss. Open it on a phone or tablet, or with your browser's device emulation.

a drag on the pane pans
Tap & drag me
Node 2
Node 3
Node 4
Arrow keys move the view, Home shows the whole flow.
bit Blow

Try it

  • Touch and drag a node to move it, and drag the empty background with one finger to pan.
  • Pinch with two fingers to zoom about the point between them. Untick Pinch to zoom and a second finger no longer zooms - the first carries on with whatever it was doing - while the control bar's buttons still zoom.
  • Drag from a handle to another node's handle to connect them; letting go near a handle is enough.
  • Tick Tap to connect, then tap a handle and tap another node's handle: the two are connected with no drag at all. Tapping empty space abandons it.
  • Tick Drag to select: a one-finger drag on the empty background now draws a selection box instead of panning, and the label beside it says which.
  • Tap a node or an edge to select it, or the background to clear the selection.

How it works

  • The canvas listens for pointer events, which a mouse, a pen and a finger all raise, and sets touch-action: none on itself while a one-finger drag pans or draws a selection box, so a finger on it is a gesture of the flow rather than a scroll of the page. With PanOnDrag and SelectionOnDrag both off, a swipe on the background scrolls the page instead, and the nodes and handles that can be dragged still drag.
  • ZoomOnPinch (on) zooms on a two-finger pinch about the fingers' midpoint - the only way to zoom on a touch screen besides the control bar.
  • SelectionOnDrag (off) turns a plain drag on the pane into a box selection; with a keyboard, Shift (SelectionKey) does that for a single drag.
  • ConnectOnClick (off) connects with two taps as well as a drag. A connection dropped within ConnectionRadius (20 screen pixels) of a handle snaps to it, and every handle's hit area stays at least --bit-blow-handle-hit-size (12px) across on screen at any zoom.
  • BlowControls and BlowMiniMap take taps as well; on a phone-sized screen this site hides the minimap, which would cover the nodes.
An unhandled error has occurred. Reload 🗙