Defines the geometry of IPort instances with respect to specific IPortLocationModelParameters.
Remarks
In addition to defining the location of a port with respect to a specific IPortLocationModelParameter, a port location model is typically the factory of the model parameters that are compatible with it, too.
Typically, the port location model defines a compilation of valid locations for ports, and a specific model parameter specifies an exact geometry for a port.
By design, the same instance of a port location model can be shared by multiple port location model parameters. Similarly, the same instance of a port location model parameter can be shared by multiple ports.
This interface provides the getContext method that can be used to query additional aspects of the implementation.
Type Details
- yFiles module
- view
See Also
Methods
Factory method that creates a parameter for the given owner
that tries to match the provided location in absolute world coordinates.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The port owner that will own the port for which the parameter shall be created.
- location - Point
- The location in the world coordinate system that should be matched as best as possible.
Returns
- ↪IPortLocationModelParameter
- A new instance that can be used to describe the location of an IPort at the given
owner
.
Throws
- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
Provides a lookup context for the given port.
Determines the location of the port for the given parameter.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to determine the location for.
- locationParameter - IPortLocationModelParameter
- The parameter to use. The parameter can be expected to be created by this instance having the model property set to this instance.
Returns
- ↪Point
- The calculated location of the port.