C

FreeNodePortLocationModel

A straightforward implementation of an IPortLocationModel for IPorts at INodes that determine the location dynamically using the INode.layout.
Inheritance Hierarchy

Remarks

Internally, the location is stored as the ratios by which the ISize.width and ISize.height of the INode.layout need to be scaled and additional offsets to obtain the offset to the top-left corner of the node layout.

See Also

Developer's Guide

Members

No filters for this type

Methods

Factory method that creates a parameter for the given owner that tries to match the provided location in absolute world coordinates.
final

Parameters

owner: IPortOwner
The port owner that will own the port for which the parameter shall be created.
location: Point
conversion
The location in the world coordinate system that should be matched as best as possible.

Return Value

IPortLocationModelParameter
A new instance that can be used to describe the location of an IPort at the given owner.
Creates a parameter that uses the given ratios and offsets.
The 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.
final

Parameters

ratios: Point
conversion
The ratios of the node layout's size.
offset?: Point
conversion
The offset that is added after the ratios are applied.

Return Value

FreeNodePortLocationModelParameter
A new parameter that matches the specification.

Throws

Exception ({ name: 'ArgumentError' })
ratios or offset contains one or more NaN values.
final

Parameters

port: IPort

Return Value

final

Parameters

port: IPort
locationParameter: IPortLocationModelParameter

Return Value

Constants

A read only immutable singleton instance of a parameter that locates the port at the center of the bottom border of the node layout.
This is the same as creating a parameter using (0.5,1) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the bottom left corner of the node layout.
This is the same as creating a parameter using (0,1) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the bottom right corner of the node layout.
This is the same as creating a parameter using (1,1) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the center of the node layout.
This is the same as creating a parameter using (0.5,0.5) as ratios and (0,0) as offsets.
static
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 left border of the node layout.
This is the same as creating a parameter using (0,0.5) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the center of the right border of the node layout.
This is the same as creating a parameter using (1,0.5) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the center of the top border of the node layout.
This is the same as creating a parameter using (0.5,0) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the top left corner of the node layout.
This is the same as creating a parameter using (0,0) as ratios and (0,0) as offsets.
static
A read only immutable singleton instance of a parameter that locates the port at the top right corner of the node layout.
This is the same as creating a parameter using (1,0) as ratios and (0,0) as offsets.
static