documentationfor yFiles for HTML 2.6

IPortDefaults

Interface used by IGraph to declare and obtain the defaults for ports at nodes and edges.

Inheritance Hierarchy
IPortDefaults

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

Setting defaults for ports
// Ports on nodes and edges have different IPortDefault instances.
// These can be retrieved from their owner type's defaults

// the defaults for node ports can be set on the IPortDefaults instance
// found at the Ports property of the node defaults
graph.nodeDefaults.ports.autoCleanUp = false
graph.nodeDefaults.ports.locationParameter =
  FreeNodePortLocationModel.NODE_CENTER_ANCHORED

// the defaults for edge ports can be set on the IPortDefaults instance
// found at the Ports property of the edge defaults
graph.edgeDefaults.ports.autoCleanUp = false
graph.edgeDefaults.ports.locationParameter =
  BendAnchoredPortLocationModel.FIRST_BEND

Type Details

yfiles module
view-component
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.graph.IPortDefaults

See Also

Properties

Methods