Edge Path Options
Every built-in path algorithm can be tuned per edge with a BlowEdgePathOptions: the bezier's curvature, a smooth step's corner radius, how far a step runs out of its handle before turning, and where along the route its bend sits.
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
- Move Curvature: the bezier, which has to double back to reach its end, swings out further or tighter. The simple bezier beside it, doubling back the same way, does not change.
- Move Corner radius: the smooth step's corners round off or turn square at 0. The step stays square.
- Move Offset: the smooth step and the step run further straight out of each handle before their first turn.
- Move Bend: the smooth step's and the step's middle segment slides from the source end (0) to the target end (1).
- Drag any node: the tuned paths keep their settings as they follow it.
- Defaults puts every slider back to the algorithm's own default.
How it works
- An edge's
PathOptionstakes aBlowEdgePathOptions; every value is optional and falls back to the algorithm's default when null. Curvature(0.25) applies toBezier: how far the control points reach when the target lies behind the source handle. Between handles that face each other the reach is half the distance whatever it is.SimpleBeziertakes no options: its control points always sit halfway along the handle axis, which is why it stays put.BorderRadius(5 forSmoothStep, 0 forStep) rounds the corners;Offset(20) is the straight run out of each handle;StepPosition(0.5) places the bend between the source (0) and the target (1). All three apply to both step types.LoopRadius(60) sets how far a self-connection loops out; the Self-Connections example tunes it.- Each edge holds its own options object, retuned in place by the sliders: the canvas compares the values rather than the object, so changing them is enough to redraw.
Clone()copies one, andBlowDefaultEdgeOptions.PathOptionsis cloned into every new edge.