Node Resizer
A BlowNodeResizer in the node template gives a node resize controls on every corner and side - by default while it is selected. The toolbar sets when they show, their colour, whether the sides resize too and a size cap; the log under the canvas follows the canvas's resize events.
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 a node to select it and reveal its resize controls, then drag a corner square to resize it. The opposite corner stays put, and the size inside the node follows.
- Drag a side - anywhere along it, not only at the middle - to resize in one direction. Untick Resize from the sides and only the corners resize.
- Resize Keep ratio: however you drag, it stays square.
- Nothing gets smaller than 80 × 50. Tick Cap at 280 × 180 and nothing gets larger either.
- Set Controls to Always to show them on every node without selecting it, or Never to hide them even on a selected node.
- Pick a Colour for the corner squares and the outline.
- Press Escape during a resize to put the node back as it was.
- Watch the log: one line when a resize starts, and one when it ends with the new size and how many moves it took.
How it works
BlowNodeResizergoes inside the node's template and draws four corner squares, an outline and four invisible side strips. Resizing writes the node'sWidthandHeight, and itsPositionwhen the left or top edge moves.Visible(null) shows the controls only while the node is selected; true or false forces them.Color(var(--bit-blow-node-selected)) paints the squares and the outline.ShowEdgeControls(true) adds the side strips. They run the whole length of each side rather than sitting at the midpoints, where the connection handles are.MinWidthandMinHeight(40 and 30; 80 and 50 here) andMaxWidthandMaxHeight(unbounded) limit the size, in flow units.KeepAspectRatio(false) lets the dragged axis drive the other; it is on for node 2 only.- The canvas raises
OnNodeResizeStart, thenOnNodeResizeon every move, thenOnNodeResizeEnd, each with the node;NodesChangedfollows the end, once. - Both nodes start with an explicit
WidthandHeight, and the template's content hasheight: 100%, so it fills the node at any size.