A straightforward implementation of an IPortLocationModel for IPorts at INodes that determine the location dynamically using the layout.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.FreeNodePortLocationModel
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.
Implements
Creates a parameter that uses the given ratios and offsets.
Remarks
ratios
will be scaled by the node layout's size and added to the node's top left corner and the offset
to determine the port location.Parameters
A map of options to pass to the method.
- ratios - Point
- The ratios of the node layout's size.
- offset - Point
- The offset that is added after the
ratios
are applied.
Returns
- ↪IPortLocationModelParameter
- A new parameter that matches the specification.
Throws
- Exception({ name: 'ArgumentError' })
ratios
oroffset
contains one or more NaN values.
Provides a lookup context for the given combination of port and parameter.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to use in the context.
- locationParameter - IPortLocationModelParameter
- The parameter to use for the port in the context.
Returns
- ↪ILookup
- An implementation of the ILookup interface that can be used to query additional aspects of the port/parameter combination.
Implements
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.
Implements
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Implements
Constants
A read only immutable instance of the FreeNodePortLocationModel.
A read only immutable singleton instance of a parameter that locates the port at the center of the bottom border of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the bottom left corner of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the bottom right corner of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the center of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the center of the left border of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the center of the right border of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the center of the top border of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the top left corner of the node layout.
Remarks
A read only immutable singleton instance of a parameter that locates the port at the top right corner of the node layout.