documentationfor yFiles for HTML 3.0.0.3

IFoldingEdgeConverter

Interface used by FoldingManager and IFoldingView which is responsible for managing edges between folder nodes.

Remarks

Since createFoldingView creates views that can potentially contain edges that connect to nodes which have a different set of attributes, these edges might need to have a separate set of attributes, too. Implementations of this interface are being called by the IFoldingViews to configure these kind of folding edges.

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
const mergingFoldingEdgeConverter = new MergingFoldingEdgeConverter()
mergingFoldingEdgeConverter.ignoreEdgeDirection = true
mergingFoldingEdgeConverter.foldingEdgeDefaults.copyLabels = true
mergingFoldingEdgeConverter.foldingEdgeDefaults.style =
  new PolylineEdgeStyle({ stroke: 'gray' })
manager.foldingEdgeConverter = mergingFoldingEdgeConverter

Type Details

yFiles module
view

See Also

Sample Graphs

Methods

Static Methods