documentationfor yFiles for HTML 2.6

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.

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.NODE_TOP_ANCHORED

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.NODE_RIGHT_ANCHORED

Type Details

yfiles module
view-folding
yfiles-umd modules
view-folding, view-graphml, view
Legacy UMD name
yfiles.graph.FoldingPortState

See Also

Properties

Methods