documentationfor yFiles for HTML 2.6

GenericPortLocationModel

An implementation of IPortLocationModel that can be used to create custom port location models out of existing IPortLocationModelParameter instances.

Inheritance Hierarchy
GenericPortLocationModel
Implemented Interfaces

Remarks

This class holds a number of parameters and serves as a container for these parameters.

Examples

Custom models can easily be created in the following way:

Creating a custom GenericPortLocationModel
const genericModel = new GenericPortLocationModel()

genericModel.add(FreeNodePortLocationModel.NODE_CENTER_ANCHORED)
genericModel.add(FreeNodePortLocationModel.NODE_BOTTOM_ANCHORED)
genericModel.add(FreeNodePortLocationModel.NODE_TOP_ANCHORED)
genericModel.add(FreeNodePortLocationModel.NODE_RIGHT_ANCHORED)
genericModel.add(FreeNodePortLocationModel.NODE_LEFT_ANCHORED)
graph.nodeDefaults.ports.locationParameter =
  genericModel.locationParameters.first()

Note that in order to work, this model needs to have at least one parameter added.

Type Details

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

See Also

Constructors

Properties

Methods