documentationfor yFiles for HTML 3.0.0.3

FoldingEdgeDefaults

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

Inheritance Hierarchy
FoldingEdgeDefaults

Remarks

This class can be used to manage and synchronize the state 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, sourcePort, and targetPort properties can be configured to recursively define the behavior for labels and the edges' sourcePort and targetPorts. For custom requirements, this class may be sub-classed and implement a more customized synchronization behavior.

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 = defaultFoldingEdgeConverter

Type Details

yFiles module
view

See Also

Constructors

Properties

Methods