A canonical implementation of the IPortDefaults interface.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.PortDefaults
Constructors
Initializes a new instance of the PortDefaults class using a trivial location model parameter.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- labels - ILabelDefaults
- autoCleanUp - boolean
- locationParameter - IPortLocationModelParameter
- shareLocationParameterInstance - boolean
- style - IPortStyle
- shareStyleInstance - boolean
Properties
Gets or sets whether unused ports should automatically be removed from their owners as soon as no further edge is connected to them.
Gets or sets the defaults for labels at ports.
Gets or sets the location model parameter to use for ports.
Remarks
Depending on the setting of shareLocationParameterInstance, the getLocationParameterInstance method should return a clone of this instance or the very same instance.
See Also
IPortDefaults.shareLocationParameterInstance,
IPortDefaults.getLocationParameterInstance,
Creating Edges
Implements
Gets or sets the style to use for ports.
Remarks
Depending on the setting of shareStyleInstance, the getStyleInstance method should return a clone of this instance or the very same instance.
See Also
Implements
Methods
Factory method that returns a location model parameter instance for use with newly created ports.
Remarks
Most implementations will yield either, a clone of or the locationParameter property, if shareLocationParameterInstance is enabled, but they might use more complicated logic, too.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the port that will be created.
Returns
- ↪IPortLocationModelParameter
- The parameter to use, which for most implementations is either a clone of or the locationParameter property, if shareLocationParameterInstance is enabled.
Implements
Factory method that returns a style instance for use with newly created ports.
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.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the port that will be created.
Returns
- ↪IPortStyle
- The style to use, which for most implementations is either a clone of or the style property, if shareStyleInstance is enabled.