A data container representing the state of an edge whose source and/or target node are collapsed.
Inheritance Hierarchy
FoldingLabelOwnerState
FoldingEdgeState
Remarks
When the properties of the state are changed, these changes are reflected immediately in the views.
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.NODE_RIGHT_ANCHORED
Type Details
- yfiles module
- view-folding
- yfiles-umd modules
- view-folding, view-graphml, view
- Legacy UMD name
- yfiles.graph.FoldingEdgeState
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
options - Object
A map of options to pass to the method.
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: Object) : FoldingLabelStateAdds a FoldingLabelState to this state.
Parameters
options - Object
A map of options to pass to the method.
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 - Object
- The tag of the label.
Returns
- ↪FoldingLabelState
- The newly added FoldingLabelState.
Implements
Returns an IEdge instance which represents this edge state.
Remarks
The returned edge is not present in any graph but may be passed to getViewItem to get the edge state's view edge in the folding view graph.
Returns
Removes all bends.
Removes all labels.
Defined in
Removes the bend
from this edge state.
Parameters
options - Object
A map of options to pass to the method.
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
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- label - FoldingLabelState
- The label to remove.