An IFoldingEdgeConverter implementation that makes the view contain at most one folding edge between each pair of nodes by letting a single folding edge represent all master edges.
Implements
- I
Remarks
This implementation by default, will have the locationParameters set to CENTER and won't initially copy the bends from the master edge.
Examples
const defaultFoldingEdgeConverter = new FoldingEdgeConverter()
// initialize the new edges with a gray style
defaultFoldingEdgeConverter.foldingEdgeDefaults.style =
new PolylineEdgeStyle({ stroke: 'gray' })
defaultFoldingEdgeConverter.foldingEdgeDefaults.copyLabels = true
// initialize the labels with a new style
defaultFoldingEdgeConverter.foldingEdgeDefaults.labels.style =
new LabelStyle()
defaultFoldingEdgeConverter.foldingEdgeDefaults.labels.shareStyleInstance = true
// initialize all label properties (the default)
// but synchronize only the text after initialization
defaultFoldingEdgeConverter.foldingEdgeDefaults.labels.updateFoldingOptions =
FoldingSynchronizationOptions.LABEL_TEXT
defaultFoldingEdgeConverter.foldingEdgeDefaults.labels.updateMasterOptions =
FoldingSynchronizationOptions.LABEL_TEXT
defaultFoldingEdgeConverter.foldingEdgeDefaults.labels.autoAdjustPreferredSize = true
manager.foldingEdgeConverter = defaultFoldingEdgeConverterSee Also
Developer's Guide
API
- foldingEdgeConverter
Members
Show:
Constructors
Properties
Gets or sets the defaults to apply to folding edges.
Gets or sets the defaults to apply to folding edges.
Most of the work of initializeFoldingEdgeState and updateFoldingEdgeState is delegated to this instance when edges are initialized or updated.
final
Gets or sets a value indicating whether edge direction should be ignored for the determination of the folding edges that are currently part of the graph .
Gets or sets a value indicating whether edge direction should be ignored for the determination of the folding edges that are currently part of the graph .
final
Property Value
true if edge direction should be ignored; false otherwise.Methods
Adds the first separate edge to the source and target node pair using the addAsSeparateEdge method.
Adds the first separate edge to the source and target node pair using the addAsSeparateEdge method.
protected
Parameters
- converterContext: IFoldingEdgeConverterContext
- The context providing methods for edge conversion.
- foldingView: IFoldingView
- The folding view in which the edges reside.
- masterEdge: IEdge
- The master edge to be represented.
- viewSourceNode: INode
- The view's source node.
- sourceIsCollapsed: boolean
- Indicates whether the source node is collapsed.
- viewTargetNode: INode
- The view's target node.
- targetIsCollapsed: boolean
- Indicates whether the target node is collapsed.
Tries to add the folding edge to an existing folding edge, considering the ignoreEdgeDirection property.
Tries to add the folding edge to an existing folding edge, considering the ignoreEdgeDirection property.
If this is the first folding edge that connects the source and target node, this method will use the addFirstSeparateEdge converterContext to create the initial representative.
Parameters
- converterContext: IFoldingEdgeConverterContext
- The context providing methods for edge conversion.
- foldingView: IFoldingView
- The folding view in which the edges reside.
- masterEdge: IEdge
- The master edge to be represented.
- source: INode
- The source node of the edge.
- sourceIsCollapsed: boolean
- Indicates whether the source node is collapsed.
- target: INode
- The target node of the edge.
- targetIsCollapsed: boolean
- Indicates whether the target node is collapsed.
Implements
IFoldingEdgeConverter.addFoldingEdgeThis implementation calls initializeState, only.
Parameters
- state: FoldingEdgeState
- The FoldingEdgeState of the edge to change.
- foldingView: IFoldingView
- The graph to which the folding edge belongs.
- foldingEdge: IEdge
- The folding edge for which the appearance shall be determined.
- masterEdges: IListEnumerable<IEdge>
- The list of getMasterEdges
This implementation calls updateState, only.
Parameters
- state: FoldingEdgeState
- The FoldingEdgeState of the edge to change.
- foldingView: IFoldingView
- The graph to which the folding edge belongs.
- foldingEdge: IEdge
- The folding edge for which the appearance might need an update.
- masterEdges: IListEnumerable<IEdge>
- The list of master edges, that the folding edge currently represents.
Callback to optionally back propagate state changes on a folding edge's state to the masterEdges.
Callback to optionally back propagate state changes on a folding edge's state to the
masterEdges.This implementation calls updateMasterEdges, only.
Parameters
- state: FoldingEdgeState
- The state to synchronize with the master edges.
- foldingView: IFoldingView
- The graph to which the folding edge belongs.
- masterEdges: IListEnumerable<IEdge>
- The edges in the masterGraph to update.
See Also
Developer's Guide
API
- updateMasterEdges