Arrows
A page's arrows connect its nodes. Each arrow has two endpoints and, optionally, a pinned route, a label and a style.
{
"id": "a1",
"start": { "nodeId": "api", "side": "right", "offset": 0 },
"end": { "nodeId": "fn", "side": "left", "offset": 0 },
"label": { "text": "Invoke", "position": 0.5, "side": "over" }
}| Field | Value | Notes |
|---|---|---|
id | string | Unique among the page's arrows. |
start | an endpoint | Where the arrow starts. |
end | an endpoint | Where the arrowhead is, by default. |
frozen | a list of lines | Optional. Pins the route. See Routes. |
label | object | Optional. See Labels. |
style | object | Optional. See Lines and arrowheads. |
Arrows are orthogonal lines with rounded bends, with a filled head at end unless the style sets heads or headShape.
Endpoints#
| Kind | Shape | Notes |
|---|---|---|
| Attached | { "nodeId": "fn", "side": "left", "offset": 0 } | nodeId is a node on the same page and side is "top", "right", "bottom" or "left". Follows the node when it moves. |
| Free | { "x": 100, "y": 200 } | A point on the canvas. |
offset moves an attached endpoint along its side, in world units from the middle, with negative values toward the top or the left.
Routes#
Without frozen, Lineout routes the arrow itself: out of the start side, bending halfway between the two nodes, into the end side. The route only avoids the arrow's own two nodes, so it can cross others.
frozen pins the route to lines it follows in order. Each entry is a whole line, vertical at x = value or horizontal at y = value:
"frozen": [
{ "orientation": "vertical", "value": 320 },
{ "orientation": "horizontal", "value": 480 }
]- Alternate the orientations, starting across the start side: vertical after a
leftorrightside, horizontal aftertoporbottom. - Put the lines in empty gaps between columns and rows, where they don't cross nodes.
The values are absolute coordinates. When you move an arrow's nodes in the JSON, move its frozen lines with them.
In the editor, dragging a segment adds frozen lines for you. See Connecting with arrows.
Labels#
label is { "text": "HTTPS", "position": 0.5, "side": "over" }:
| Field | Value |
|---|---|
text | The label's text. |
position | From 0 at the start of the route to 1 at its end. |
side | "over", "on" or "under" the line. |
Since the position is measured along the route, the label stays with its arrow when the route changes.