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.
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
- 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(aBlowEdgeType,Bezierby default) picks the path algorithm:Bezier,SimpleBezier,Straight,Step,SmoothSteporRouted.Bezierreaches further out when the edge has to double back, so it still leaves the node cleanly;SimpleBezierkeeps its control points halfway along the handle axis, so it stays flat. While the end is ahead of the handle the two agree.Routedruns orthogonal segments round the nodes in its way and is routed again whenever a node moves; the Edge Routing example tunes it.Labeldraws text on a plate at the path's midpoint;StrokeandStrokeWidth(1.5 by default) colour and thicken the line;Styleis an inline style for the path, here astroke-dasharray;Animatedruns a marching dash along it.MarkerEnd(on by default) andMarkerStartdraw arrowheads;MarkerType = ArrowClosedfills 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 thebit-blow-edge-interactionpath that draws it.Focusable(on by default) puts an edge in the tab order; the checkbox sets it on every edge.EdgesFocusableon the canvas takes them all out at once.