documentationfor yFiles for HTML 3.0.0.3

FoldingPortState

A data container representing the state of a port at a FolderNodeState or FoldingEdgeState.

Inheritance Hierarchy
FoldingLabelOwnerState
FoldingPortState

Remarks

When the properties of the state are changed, these changes are reflected immediately in the views.

This class cannot be instantiated

Examples

Ports at folder nodes should be retrieved from the ports collection of its owner.

const state = manager.getFolderNodeState(masterNode)
const portState = state.ports.get(0)
portState.locationParameter = FreeNodePortLocationModel.TOP

The source and target ports of an edge should be retrieved from the sourcePort and targetPort properties of the edge.

const state = manager.getFoldingEdgeState(
  new FoldingEdgeStateId(
    masterEdge,
    masterSource,
    true,
    masterTarget,
    false,
  ),
)
const portState = state.sourcePort
portState.locationParameter = FreeNodePortLocationModel.RIGHT

Type Details

yFiles module
view

See Also

Properties

Methods