Ir al contenido

SpotLayoutOptions

Defined in: layout/SpotLayout.ts:8

Options for spot layout.

optional alignmentSpot?: object

Defined in: layout/SpotLayout.ts:23

GoJS-compatible: the fractional point on each node (0,0 = top-left, 0.5,0.5 = center, 1,1 = bottom-right) that aligns to the target spot, independent of that node’s own size — e.g. with alignmentSpot centered and a single target spot (no offset), differently-sized nodes all end up centered on the same point rather than aligned by their top-left corners. Default: { x: 0, y: 0 } (top-left), matching plain positioning.

x: number

y: number


optional center?: boolean

Defined in: layout/Layout.ts:17

Whether to center the layout. Default: true

LayoutOptions.center


optional direction?: "horizontal" | "vertical"

Defined in: layout/Layout.ts:15

Whether to arrange in a specific direction. Default: ‘vertical’

LayoutOptions.direction


optional offset?: object

Defined in: layout/SpotLayout.ts:12

Offset for each subsequent node. Default: { x: 120, y: 0 }

x: number

y: number


optional padding?: number

Defined in: layout/Layout.ts:13

Border padding. Default: 20

LayoutOptions.padding


optional spacing?: number

Defined in: layout/Layout.ts:11

Spacing between nodes. Default: 50

LayoutOptions.spacing


optional spot?: object

Defined in: layout/SpotLayout.ts:10

The spot (position) to place all nodes at. Default: { x: 0, y: 0 }

x: number

y: number


optional wrap?: number

Defined in: layout/SpotLayout.ts:14

Maximum nodes per row before wrapping. 0 = no wrap. Default: 0