A port location model that places the port on the edge path at a specified ratio.
Type Details
- yFiles module
- view
Methods
Factory method that creates a parameter for the given owner
that tries to match the provided location in absolute world coordinates.
Parameters
options - Object
A map of options to pass to the method.
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.
Implements
Creates a parameter at the provided edge path ratio.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- edgePathRatio - number
- The ratio at which to place the port at the edge path. A ratio of
0.0
will place the port at the source side of the edge path, a ratio of1.0
at the target side. The default is0.5
.
Returns
- ↪EdgePathPortLocationModelParameter
- A port location parameter at the provided edge path ratio for this model instance.
Provides a lookup context for the given port.
Determines the location of the port for the given parameter.
Parameters
options - Object
A map of options to pass to the method.
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.
Implements
Constants
A static immutable global instance of this class.