Skip to content

Interactive MiniMap

A BlowMiniMap that steers the main view: with Pannable a click or drag on it moves the view there, with Zoomable the wheel over it zooms, and either way it takes keyboard focus and can be steered from the keyboard. OnNodeClick tells you which node was picked on the map - here it selects that node on the canvas.

Click a node on the map
Node 0
Node 1
Node 2
Node 3
Node 4
Node 5
Node 6
Node 7
Node 8
Node 9
Node 10
Arrow keys move the view, Shift with an arrow moves it further, plus and minus zoom, Home shows the whole flow.
bit Blow

Try it

  • Click anywhere on the minimap to centre the main view there, or drag across it to steer the view continuously; the clear window on the map is what the canvas shows.
  • Click a node on the map: the view moves to it, the node is selected on the canvas (and turns the selection colour on the map), and the toolbar names it.
  • Scroll over the map to zoom the main view about its centre; drag Zoom step to change how far each wheel notch zooms.
  • Tab to the map (or click it), then press the arrow keys to move the view, Shift+arrow to move it five times as far, + and - to zoom and Home to fit the whole flow. The keys stay with the map: the page does not scroll and selected nodes do not move. Drag Arrow step to change how far one press goes.
  • Untick Pannable or Zoomable to turn off that half - clicks or the wheel then do nothing on the map. With both off the map is only a picture, and Tab skips it.
  • With a screen reader, Tab to the map: it is announced as "Pipeline overview, overview map", followed by the keys it answers to.

How it works

  • Pannable (default true) moves the main view to the point pressed or dragged on the map; Zoomable (default false) zooms it with the wheel, by ZoomStep percent (10) per notch.
  • A pannable or zoomable map is in the tab order: arrows pan by KeyboardPanStep (0.1 of the pane, five times that with Shift), + and - zoom by ZoomStep, and Home fits the flow. A map that steers nothing renders as an image, out of the tab order.
  • OnNodeClick is raised with the node under the pointer when the map is pressed; the page passes it to SelectAsync([node]), which makes it the canvas's selection.
  • AriaLabel (default "Mini map") is the map's accessible name and RoleDescription (default "mini map") what a screen reader calls it while it can be steered.
  • KeyboardInstructions is read as the map's description. Left null it describes the keys the map answers to in English; the page writes its own so it can mention Shift, and keeps it in step with the two checkboxes. An empty string leaves it undescribed.
  • Width and Height (200 by 150) size the map in screen pixels.
An unhandled error has occurred. Reload 🗙