Skip to content

Commit

Permalink
Added documentation about EdgePlacement to SLabelImpl (#31)
Browse files Browse the repository at this point in the history
* Added documentation about EdgePlacement to SLabelImpl

* Update hugo/content/docs/smodel.md

Co-authored-by: Guillaume Fontorbe <guillaume.fontorbe@typefox.io>

---------

Co-authored-by: Guillaume Fontorbe <guillaume.fontorbe@typefox.io>
  • Loading branch information
jbicker and gfontorbe authored Jan 12, 2024
1 parent 4e35431 commit c32088b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hugo/content/docs/smodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ A label represents some text to be displayed and attached to a node, compartment
* `alignment: Point`: The alignment of the label. Defaults to `Point.ORIGIN`.
* `opacity: number`: The opacity of the label. Defaults to `1`.
* `edgePlacement: EdgePlacement` - *optional*: The placement of the label on an edge. Defaults to `EdgePlacement.NONE`.
* `rotate: boolean` - true, if the label should be rotated to touch the edge tangentially
* `side: EdgeSide` - where is the label relative to the line's direction. Possible values are 'bottom', 'top', 'left', 'right', and 'on'.
* `position: number` - between 0 (source anchor) and 1 (target anchor)
* `offset: number` - space between label and edge/connected nodes
* `moveMode: 'edge' | 'free' | 'none'` - *optional* constrains where the label can be moved when move feature is enabled for the respective Label.
`edge` means the label can be moved along the edge, `free` means the label can be moved freely, `none` means the label cannot moved.
Defaults to `edge`.

*Inheritance:*

Expand Down

0 comments on commit c32088b

Please sign in to comment.