Interface used by IGraph to declare and obtain the defaults for edges and their labels and ports.
Inheritance Hierarchy
IEdgeDefaults
Remarks
Note that changing these defaults does not change properties of already created model items. Rather, only items created after the change are affected.
Examples
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.IEdgeDefaults
See Also
Properties
Gets or sets the defaults for labels at edges.
Examples
graph.edgeDefaults.labels.layoutParameter =
new EdgeSegmentLabelModel().createDefaultParameter()
See Also
Gets or sets the defaults for ports at edges.
Remarks
Note that these are not the defaults for the sourcePorts or targetPorts. Instead, these are the defaults for the ports in the edge's ports collection to which other edges can connect.
Examples
// don't remove node labels after their
// last adjacent edge has been removed
graph.edgeDefaults.ports.autoCleanUp = false
See Also
Gets or sets the style to use for edges.
Remarks
Depending on the setting of shareStyleInstance, the getStyleInstance method should return a clone of this instance or the very same instance.
Examples
graph.edgeDefaults.style = new PolylineEdgeStyle({
stroke: Stroke.BLACK,
targetArrow: IArrow.DEFAULT
})
See Also
Methods
Factory method that returns a style instance for use with newly created edges.
Remarks
Most implementations will yield either, a clone of or the style property, if shareStyleInstance is enabled, but they might use more complicated logic, too.
Returns
- ↪IEdgeStyle
- The style to use, which for most implementations is either a clone of or the style property, if shareStyleInstance is enabled.