Skip to content

NodeGraphPort

Pin/port descriptor on a NodeGraphItem connecting lines to other nodes.

Overview

Pin/port descriptor on a NodeGraphItem connecting lines to other nodes. Provides extensive layout configuration and interaction capabilities.

API

NodeGraphPort(String, NodeGraphPortKind, NodeGraphPortSide, float)

Constructs a NodeGraphPort with ID, direction kind, visual edge side, and pixel offset.

Parameter Type Description
id String The unique identifier.
kind NodeGraphPortKind The port connection direction kind.
side NodeGraphPortSide The port edge side.
offset float The port offset along the node edge in pixels.

NodeGraphPort::enabled()

Returns true if this port is interactive and can accept or initiate links.

Returns boolean: True if enabled; false otherwise..

NodeGraphPort::enabled(boolean)

Sets whether this port is interactive.

Parameter Type Description
enabled boolean Whether the feature or item is enabled.

Returns NodeGraphPort: This instance for chaining..

NodeGraphPort::id()

Returns the port identifier unique within its owning item.

Returns String: The unique identifier string..

NodeGraphPort::itemId()

Returns the ID of the item owning this port.

Returns String: The item identifier string..

NodeGraphPort::kind()

Returns the connection direction kind.

Returns NodeGraphPortKind: The menu item kind..

NodeGraphPort::kind(NodeGraphPortKind)

Sets the connection direction kind.

Parameter Type Description
kind NodeGraphPortKind The port connection direction kind.

Returns NodeGraphPort: This instance for chaining..

NodeGraphPort::offset()

Returns the offset along the node edge in pixels.

Returns float: The port offset in pixels along the node edge..

NodeGraphPort::offset(float)

Sets the offset along the node edge in pixels.

Parameter Type Description
offset float The port offset along the node edge in pixels.

Returns NodeGraphPort: This instance for chaining..

NodeGraphPort::ref()

Returns the compound NodeGraphPortRef pointing to this port.

Returns NodeGraphPortRef: The compound port reference..

NodeGraphPort::side()

Returns the visual edge side where the port is rendered.

Returns NodeGraphPortSide: The port visual edge side..

NodeGraphPort::side(NodeGraphPortSide)

Sets the visual edge side where the port is rendered.

Parameter Type Description
side NodeGraphPortSide The port edge side.

Returns NodeGraphPort: This instance for chaining..

NodeGraphPort::type()

Returns the data type or compatibility label for connection validation.

Returns String: The type or compatibility category string..

NodeGraphPort::type(String)

Sets the data type or compatibility label.

Parameter Type Description
type String The type or category string.

Returns NodeGraphPort: This instance for chaining..

NodeGraphPort::visible()

Returns true if this port is visible.

Returns boolean: True if visible; false otherwise..

NodeGraphPort::visible(boolean)

Sets whether this port is visible.

Parameter Type Description
visible boolean Whether the item is visible.

Returns NodeGraphPort: This instance for chaining..