Skip to content

Node Toolbar

A BlowNodeToolbar in the node template anchors controls to a node - by default while it is selected - and keeps them the same size on screen at any zoom. The toolbar above the canvas places it: the side, where along that side, the gap, and when it shows.

Select me
Or me
bit Blow

Try it

  • Click a node to select it: its toolbar appears. ๐ŸŽจ gives the node a new colour and ๐Ÿ—‘ deletes it.
  • Scroll to zoom in and out: the node grows and shrinks, the toolbar keeps its size and its distance from the node.
  • Pick a Position to move the toolbar to another side of the node.
  • Pick an Align: Start and End line the toolbar up with the node's left and right corners (top and bottom on the left and right sides) instead of centring it.
  • Drag Offset to widen or close the gap between node and toolbar.
  • Set Show to Always to keep every node's toolbar open without selecting it, or Never to hide it even on a selected node.
  • Drag on the toolbar: it neither moves the node nor pans the canvas.

How it works

  • BlowNodeToolbar goes inside the node's template, so its buttons can act on that node. It sits inside the zoomed layer and is counter-scaled by the zoom, which is what keeps it a constant size on screen.
  • Visible (null) shows it only while the node is selected; true or false forces it.
  • Position (Top) is the side of the node it is anchored to, and Align (BlowToolbarAlign.Center, or Start and End) where along that side.
  • Offset (8) is the gap between node and toolbar in screen pixels, the same at any zoom.
  • A press inside the toolbar does not reach the node or the pane, so its buttons are clicked rather than starting a drag or a pan.
  • ๐ŸŽจ writes the node's Style; ๐Ÿ—‘ removes the node and its edges from the two lists. FitViewOptions with a Padding of 0.3 leaves room for a toolbar on any side.
An unhandled error has occurred. Reload 🗙