Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Interface. Edge Placement

sprotty-protocol / EdgePlacement

Interface: EdgePlacement

Defined in: model.ts:252

Each label attached to an edge can be placed on the edge in different ways. With this interface the placement of such a single label is defined.

Properties

moveMode?

optional moveMode: "edge" | "free" | "none"

Defined in: model.ts:278

where should the label be moved when move feature is enabled. ’edge’ means the label is moved along the edge, ‘free’ means the label is moved freely, ’none’ means the label can not be moved. Default is ’edge’.


offset

offset: number

Defined in: model.ts:271

space between label and edge/connected nodes


position

position: number

Defined in: model.ts:266

between 0 (source anchor) and 1 (target anchor)


rotate

rotate: boolean

Defined in: model.ts:256

true, if the label should be rotated to touch the edge tangentially


side

side: EdgeSide

Defined in: model.ts:261

where is the label relative to the line’s direction