File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -730,7 +730,7 @@ A label as an edge vertex is interpreted as the position of the node with that l
730
730
731
731
732
732
733
- == Edge types
733
+ == Edge types <edge-types>
734
734
735
735
There are three types of edges: `"line"` , `"arc"` , and `"poly"` .
736
736
All edges have at least two `vertices` , but `"poly"` edges can have more.
Original file line number Diff line number Diff line change 428
428
// / - roughly above the connector, in the case of straight lines; or
429
429
// / - on the outside of the curve, in the case of arcs.
430
430
// /
431
- // / - label-pos (number): Position of the label along the connector, from the
432
- // / start to end (from `0` to `1`).
431
+ // / - label-pos (float, ratio, relative length): Position of the label along the
432
+ // / edge, from the start to end.
433
+ // /
434
+ // / A number or ratio between zero and one is interpreted as a fraction of the
435
+ // / edge length. Physical and relative relative lengths work too. For example,
436
+ // / `100% - 1em` means `1em` from the end.
433
437
// /
434
438
// / #stack(
435
439
// / dir: ltr,
440
444
// / ),
441
445
// / )
442
446
// /
447
+ // / For `"poly"` edges (see @edge-types), a number does not specify a fraction
448
+ // / of the path length; instead, the $k$th vertex is at position $k/n$ where
449
+ // / $n$ is the number of vertices. Each midpoint is then at $k/n + 0.5$.
450
+ // /
443
451
// / - label-sep (length): Separation between the connector and the label anchor.
444
452
// /
445
453
// / With the default anchor (automatically set to `"south"` in this case):
You can’t perform that action at this time.
0 commit comments