A data container representing the state of an edge whose source and/or target node are collapsed.
Remarks
When the properties of the state are changed, these changes are reflected immediately in the views.
This class cannot be instantiated
Examples
const state = manager.getFoldingEdgeState(
new FoldingEdgeStateId(
masterEdge,
masterSource,
true,
masterTarget,
false,
),
)
state.style = new PolylineEdgeStyle({ stroke: Stroke.RED })
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
Gets the FoldingBendStates of this state.
Gets the FoldingLabelStates owned by this state.
Examples
const state = manager.getFolderNodeState(masterNode)
const labelState = state.labels.get(0)
labelState.text = 'New Label Text'
const state = manager.getFolderNodeState(masterNode)
const labelState = state.labels.get(0)
labelState.text = 'New Label Text'
Defined in
Gets the FoldingPortState which represents the source port of this edge state.
Gets or sets the style of this edge.
Gets the FoldingPortState which represents the target port of this edge state.
Methods
Adds a new FoldingBendState to this edge state at the given index
and location
.
Parameters
A map of options to pass to the method.
- location - Point
- The location of the new bend state.
- index - number
- The index the bend state shall be inserted in the bends; a negative value (which is the default) indicates that the bend should be appended to the end of the list of bends.
Returns
- ↪FoldingBendState
- The newly added bend state.
Throws
- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
addLabel
(text: string, layoutParameter?: ILabelModelParameter, style?: ILabelStyle, preferredSize?: Size, tag?: ILabel['tag']) : FoldingLabelStateAdds a FoldingLabelState to this state.
Parameters
A map of options to pass to the method.
- text - string
- The text of the new label.
- layoutParameter - ILabelModelParameter
- The layout parameter of the new label.
- style - ILabelStyle
- The style of the new label.
- preferredSize - Size
- The preferred size of the label.
- tag - ILabel['tag']
- The tag of the label.
Returns
- ↪FoldingLabelState
- The newly added FoldingLabelState.
Implements
Returns an IEdge instance which represents this edge state.
Remarks
Returns
Removes all bends.
Removes all labels.
Defined in
Removes the bend
from this edge state.
Parameters
A map of options to pass to the method.
- bend - FoldingBendState
- The bend to remove.
Throws
- Exception({ name: 'ArgumentError' })
- Thrown if the
bend
doesn't belong to this edge state.
Removes the label
from its owning FoldingLabelOwnerState.
Parameters
A map of options to pass to the method.
- label - FoldingLabelState
- The label to remove.