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.
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 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(defaulttrue) moves the main view to the point pressed or dragged on the map;Zoomable(defaultfalse) zooms it with the wheel, byZoomSteppercent (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 byZoomStep, and Home fits the flow. A map that steers nothing renders as an image, out of the tab order. OnNodeClickis raised with the node under the pointer when the map is pressed; the page passes it toSelectAsync([node]), which makes it the canvas's selection.AriaLabel(default "Mini map") is the map's accessible name andRoleDescription(default "mini map") what a screen reader calls it while it can be steered.KeyboardInstructionsis read as the map's description. Leftnullit 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.WidthandHeight(200 by 150) size the map in screen pixels.