Interface used by FoldingManager and IFoldingView which is responsible for managing the appearance of 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.IFolderNodeConverter
See Also
Methods
initializeFolderNodeState
(state: FolderNodeState, foldingView: IFoldingView, viewNode: INode, masterNode: INode)Called by view implementations to initially create the appearance of a folder node.
Remarks
This method is called by the view to allow for initially creating the appearance of a local folder node in the view when it is included in the view for the first time. This can be used, e.g. to initialize the labels or style properties with the corresponding properties of the masterNode
.
By default the state
is an exact copy of the masterNode
, including layout, style, labels, and ports.
Note that changing the appearance has to be done on state
.
Parameters
A map of options to pass to the method.
- state - FolderNodeState
- The folder node state to initialize.
- foldingView - IFoldingView
- The graph instance for which the folder node has been created.
- viewNode - INode
- The folder node instance in the view
- masterNode - INode
- The node that represents the getMasterItem of the viewstate to change.
See Also
updateFolderNodeState
(state: FolderNodeState, foldingView: IFoldingView, viewNode: INode, masterNode: INode)Called by view implementations to change the appearance of a folder node.
Remarks
This method is called by the view to allow for adjusting the appearance of a local folder node in the view when the master node for it has changed properties. This can be used, e.g. to synchronize the label or style properties with the corresponding properties of the masterNode
.
Note that changing the appearance has to be done on state
.
Parameters
A map of options to pass to the method.
- state - FolderNodeState
- The folder node state to update.
- foldingView - IFoldingView
- The graph instance for which the folder node can be changed.
- viewNode - INode
- The folder node instance in the view
- masterNode - INode
- The node that represents the getMasterItem of the viewstate to change.
See Also
Static Methods
Creates an implementation of the interface IFolderNodeConverter from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- updateFolderNodeState - function(FolderNodeState, IFoldingView, INode, INode):void
Called by view implementations to change the appearance of a folder node.
This property holds the implementation for updateFolderNodeState.
- initializeFolderNodeState - function(FolderNodeState, IFoldingView, INode, INode):void
Called by view implementations to initially create the appearance of a folder node.
This property holds the implementation for initializeFolderNodeState.
Returns
- ↪IFolderNodeConverter
- An instance of the IFolderNodeConverter interface based on the given definition.