Interface used by FoldingManager and IFoldingView which is responsible for managing edges between folder nodes.
Remarks
Examples
manager.folderNodeConverter = new DefaultFolderNodeConverter({
copyFirstLabel: true,
folderNodeStyle: new ShapeNodeStyle({ fill: Fill.GRAY })
})
Type Details
- yfiles module
- view-folding
- yfiles-umd modules
- view-folding, view-graphml, view
- Legacy UMD name
- yfiles.graph.IFoldingEdgeConverter
See Also
Sample Graphs
Methods
addFoldingEdge
(factory: IFoldingEdgeFactory, foldingView: IFoldingView, masterEdge: IEdge, source: INode, sourceIsCollapsed: boolean, target: INode, targetIsCollapsed: boolean) : IEdgeThis method gets called by the IFoldingView implementation to determine whether a given edge in the masterGraph should be represented by a folding edge in the given view.
Remarks
factory
object that implements the IFoldingEdgeFactory interface, which needs to be used by the implementation to communicate the result of the query. The implementation needs to either call addAsSeparateEdge, addToExistingFoldingEdge, or excludeFoldingEdge and return the values that these implementation yields to the caller. The implementation can optionally query the existing folding edges between the source and target node and decide whether to add the edge to the existing folding edge.Parameters
A map of options to pass to the method.
- factory - IFoldingEdgeFactory
- The IFoldingEdgeFactory implementation that needs to be called in order to communicate the results of this query.
- foldingView - IFoldingView
- The instance into which the folding edge is going to be inserted.
- masterEdge - IEdge
- The edge from the masterGraph that needs to be represented by a folding edge. Note that you may not return this instance.
- source - INode
- The source node that belongs to the IFoldingView graph that will act as the local view node of the actual source node.
- sourceIsCollapsed - boolean
- Determines whether the
source
is currently a folder node. - target - INode
- The target node that belongs to the IFoldingView graph that will act as the local view node of the actual target node.
- targetIsCollapsed - boolean
- Determines whether the
target
is currently a folder node.
Returns
- ↪IEdge
- The edge as returned by addAsSeparateEdge, or addToExistingFoldingEdge, or
null
if the edge will be excluded from the view.
initializeFoldingEdgeState
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Triggered by the view to initially create the appearance of a folding edge.
Remarks
foldingEdge
, because this would create and enqueue undo events. Rather the properties provided by the state
implementation must be set.Parameters
A map of options to pass to the method.
- 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 - IList<IEdge>
- The list of master edges, that the folding edge initially represents.
See Also
updateFoldingEdgeState
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Triggered by the view to adjust the appearance of a folding edge
Remarks
For instance, it can be used to reflect a state change in the master edges that make up that folding edge.
Implementations may not use the IFoldingView's graph instance to modify the foldingEdge
, because this would create and enqueue undo events. Rather the properties provided by the state
implementation must be set.
Parameters
A map of options to pass to the method.
- 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 - IList<IEdge>
- The list of master edges, that the folding edge currently represents.
See Also
Static Methods
Creates an implementation of the interface IFoldingEdgeConverter from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- addFoldingEdge - function(IFoldingEdgeFactory, IFoldingView, IEdge, INode, boolean, INode, boolean):IEdge
This method gets called by the IFoldingView implementation to determine whether a given edge in the masterGraph should be represented by a folding edge in the given view.
This property holds the implementation for addFoldingEdge.
- updateFoldingEdgeState - function(FoldingEdgeState, IFoldingView, IEdge, IList<IEdge>):void
Triggered by the view to adjust the appearance of a folding edge
This property holds the implementation for updateFoldingEdgeState.
- initializeFoldingEdgeState - function(FoldingEdgeState, IFoldingView, IEdge, IList<IEdge>):void
Triggered by the view to initially create the appearance of a folding edge.
This property holds the implementation for initializeFoldingEdgeState.
Returns
- ↪IFoldingEdgeConverter
- An instance of the IFoldingEdgeConverter interface based on the given definition.