Skip to content
D
Documentation

PortLayoutArgs

reference
1 min readUpdated

Import it from @grafloria/engine.

ts
interface PortLayoutArgs

Properties

NameTypeDefaultDescription
x?numberAbsolute position. Fractions of the node box by default; px when units:'px'.
y?number
units?'fraction' | 'px'
start?{ x: number; y: number }Spread ports evenly from start to end (node-local px).
end?{ x: number; y: number }
step?numberFixed spacing between consecutive ports, in px. When set, ports march from start toward end at this pitch instead of dividing the span evenly.
padding?numberInset from the corners of the edge, in px. Default 0.
angle?numberStart angle in degrees (0° = +x axis, growing clockwise in screen space).
sweep?numberArc span in degrees. Default 360 (a full ring).
radiusX?numberRadii, in px. Default: the node's half-extents (the inscribed ellipse).
radiusY?number
dx?numberConstant nudge applied after the strategy, in node-local px.
dy?number
compensateRotation?booleanCounter-rotate the port about the node's centre by the node's own rotation, so a rotated node's ports keep their WORLD-space arrangement. Default false.

Was this page helpful?

PortLayoutArgs — Grafloria