Skip to content

Edges

All six built-in path types side by side - bezier, simple bezier, straight, step, smooth step and routed - each pair also showing one way to dress an edge: a label, a colour, a dash, animation, two arrowheads. An edge's Type picks its path; everything else is a property of the same BlowEdge.

a label
bezier
labelled
simple bezier
coloured
straight
dashed
step
animated
smooth step
two arrowheads
routed
round the block
in the way
bit Blow

Try it

  • Compare the six pairs: each top node names the path type, and the node under it names what else its edge shows.
  • Drag an end node above its start node: bezier swings out in a wide S, simple bezier stays flat, and step and smooth step turn back on themselves with square and rounded corners. While the end is below, the two beziers are the same curve.
  • Drag the in the way block about: the routed edge keeps going round it, where a smooth step would run straight through.
  • Tick Show hit area to paint the invisible band that takes the pointer, then move Hit area: the band widens and narrows, and with it how far from the line a click still selects the edge. Zoom out and the band keeps its width on screen.
  • Click an empty spot of the canvas and press Tab: focus steps through the edges - the focused one drawn dashed in the selection colour - before it reaches the nodes, and Enter selects it. Untick Edges focusable and Tab goes straight to the nodes.

How it works

  • BlowEdge.Type (a BlowEdgeType, Bezier by default) picks the path algorithm: Bezier, SimpleBezier, Straight, Step, SmoothStep or Routed.
  • Bezier reaches further out when the edge has to double back, so it still leaves the node cleanly; SimpleBezier keeps its control points halfway along the handle axis, so it stays flat. While the end is ahead of the handle the two agree.
  • Routed runs orthogonal segments round the nodes in its way and is routed again whenever a node moves; the Edge Routing example tunes it.
  • Label draws text on a plate at the path's midpoint; Stroke and StrokeWidth (1.5 by default) colour and thicken the line; Style is an inline style for the path, here a stroke-dasharray; Animated runs a marching dash along it.
  • MarkerEnd (on by default) and MarkerStart draw arrowheads; MarkerType = ArrowClosed fills them.
  • InteractionWidth (14 by default) is the width of an invisible path laid over the edge to make it easy to hit, in screen pixels at any zoom. The slider sets it on every edge; the checkbox paints the bit-blow-edge-interaction path that draws it.
  • Focusable (on by default) puts an edge in the tab order; the checkbox sets it on every edge. EdgesFocusable on the canvas takes them all out at once.
An unhandled error has occurred. Reload 🗙