documentationfor yFiles for HTML 3.0.0.3

FoldingPortDefaults

A helper class that provides configuration options and helper methods that can be used in the context of initializing and updating folding ports.

Inheritance Hierarchy
FoldingPortDefaults

Remarks

This class can be used to manage and synchronize the state of folder node ports in implementations of the IFolderNodeConverter interface and the source and target node ports of folding edges in implementations of the IFoldingEdgeConverter interfaces. Start by configuring the initializeOptions, updateFoldingOptions, and updateMasterOptions, as well as the copyLabels, to match your synchronization requirements and use the style and other properties to set a default value for the initialization. The labels property can be configured to recursively define the behavior for labels at the ports. For custom requirements, this class may be sub-classed and implement a more customized synchronization behavior.

Examples

const defaultFolderNodeConverter = new FolderNodeConverter()
defaultFolderNodeConverter.folderNodeDefaults.ports.copyLabels = true
// initialize: copy all label properties (the default)
// but update only the text after initialization
defaultFolderNodeConverter.folderNodeDefaults.ports.labels.updateFoldingOptions =
  FoldingSynchronizationOptions.LABEL_TEXT
defaultFolderNodeConverter.folderNodeDefaults.ports.updateMasterOptions =
  FoldingSynchronizationOptions.LABEL_TEXT
defaultFolderNodeConverter.folderNodeDefaults.ports.copyLabels = true

// copy all port properties upon initialization (the default)
// but update only the layout afterward
defaultFolderNodeConverter.folderNodeDefaults.ports.updateFoldingOptions =
  FoldingSynchronizationOptions.LAYOUT
defaultFolderNodeConverter.folderNodeDefaults.ports.updateMasterOptions =
  FoldingSynchronizationOptions.LAYOUT

manager.folderNodeConverter = defaultFolderNodeConverter

Type Details

yFiles module
view

See Also

Constructors

Properties

Methods