Skip to content

NodeGraphConnection

Represents a directional or bidirectional connection between two ports in a NodeGraph.

Overview

Represents a directional or bidirectional connection between two ports in a NodeGraph. Provides extensive layout configuration and interaction capabilities.

API

NodeGraphConnection(String, NodeGraphPortRef, NodeGraphPortRef)

Constructs a connection between ports specified by port references.

Parameter Type Description
id String The unique identifier.
from NodeGraphPortRef The source port reference.
to NodeGraphPortRef The destination port reference.

NodeGraphConnection(String, String, String, String, String)

Constructs a connection between ports by item and port IDs.

Parameter Type Description
id String The unique identifier.
fromItemId String The source item identifier.
fromPortId String The source port identifier.
toItemId String The destination item identifier.
toPortId String The destination port identifier.

NodeGraphConnection::enabled()

Returns true if this connection is active and enabled.

Returns boolean: True if enabled; false otherwise..

NodeGraphConnection::enabled(boolean)

Sets whether this connection is active and enabled.

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

Returns NodeGraphConnection: This instance for chaining..

NodeGraphConnection::from()

Returns the source port reference.

Returns NodeGraphPortRef: The source port reference..

NodeGraphConnection::fromItemId()

Returns the source node item ID.

Returns String: The item identifier string..

NodeGraphConnection::fromPortId()

Returns the source port ID.

Returns String: The port identifier string..

NodeGraphConnection::id()

Returns the unique identifier of this connection.

Returns String: The unique identifier string..

NodeGraphConnection::selected()

Returns true if this connection is currently selected.

Returns boolean: True if currently selected; false otherwise..

NodeGraphConnection::to()

Returns the destination port reference.

Returns NodeGraphPortRef: The destination port reference..

NodeGraphConnection::toItemId()

Returns the destination node item ID.

Returns String: The item identifier string..

NodeGraphConnection::toPortId()

Returns the destination port ID.

Returns String: The port identifier string..

NodeGraphConnection::type()

Returns the connection data type or compatibility category string.

Returns String: The type or compatibility category string..

NodeGraphConnection::type(String)

Sets the connection data type or compatibility category string.

Parameter Type Description
type String The type or category string.

Returns NodeGraphConnection: This instance for chaining..