Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation about EdgePlacement to SLabelImpl #31

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hugo/content/docs/smodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,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