ElementPort
Declarative port description for elementPort and elementPorts.
Captures the common port styling and label options in a flat shape, which the
presets expand into a full dia.Element.Port.
Propertiesβ
className?β
optional className?: string;
Extra CSS class added to the port shape alongside the built-in jj-port class.
Defaultβ
''
color?β
optional color?: string;
Fill color of the port shape. Any CSS color; when empty the port inherits the jj-port stylesheet fill.
Defaultβ
''
cx?β
optional cx?: string | number;
Horizontal position of the port, relative to the element, for absolute
placement. Accepts a number or a calc() expression such as 'calc(w)'.
Omit to let the port group position the port instead.
cy?β
optional cy?: string | number;
Vertical position of the port, relative to the element, for absolute
placement. Accepts a number or a calc() expression such as 'calc(h)'.
Omit to let the port group position the port instead.
height?β
optional height?: number;
Height of the port shape, in pixels.
Defaultβ
8
label?β
optional label?: string;
Text label rendered next to the port. Omit for an unlabeled port.
labelClassName?β
optional labelClassName?: string;
Extra CSS class added to the label alongside the built-in jj-port-label class.
Defaultβ
''
labelColor?β
optional labelColor?: string;
Color of the label text. Any CSS color; when empty the color comes from the stylesheet.
Defaultβ
''
labelFontFamily?β
optional labelFontFamily?: string;
Font family of the label text. When empty the family comes from the stylesheet.
Defaultβ
''
labelFontSize?β
optional labelFontSize?: number;
Font size of the label text, in pixels. When empty the size comes from the stylesheet.
Defaultβ
''
labelOffsetX?β
optional labelOffsetX?: number;
Horizontal offset of the label from its computed position, in pixels.
labelOffsetY?β
optional labelOffsetY?: number;
Vertical offset of the label from its computed position, in pixels.
labelPosition?β
optional labelPosition?: string;
Placement of the label relative to the port, e.g. 'outside', 'inside', or a side name.
Defaultβ
'outside'
outline?β
optional outline?: string;
Outline (stroke) color of the port shape. Any CSS color; when empty the stroke comes from the stylesheet.
Defaultβ
''
outlineWidth?β
optional outlineWidth?: number;
Outline (stroke) width of the port shape, in pixels. Empty leaves the stroke width unset.
Defaultβ
''
passive?β
optional passive?: boolean;
Restricts the port to being a link target only; links cannot be started from it.
Defaultβ
false
shape?β
optional shape?: ElementPortShape;
Shape of the port body.
Defaultβ
'ellipse'
width?β
optional width?: number;
Width of the port shape, in pixels.
Defaultβ
8