Represents the layout of a LayoutNode, defining its size and position within a two-dimensional plane.
Inheritance Hierarchy
Implemented Interfaces
The
NodeLayout class encapsulates the dimensions and location of a node. It can be accessed through the
layout property, allowing for detailed manipulation of the node's spatial properties.
Initializes a new instance of the NodeLayout class with specified coordinates and dimensions.
options - Object
A map of options to pass to the method.
- x - number
The absolute x-coordinate of the upper-left corner of the node layout.
- y - number
The absolute y-coordinate of the upper-left corner of the node layout.
- width - number
The width of the node layout. Defaults to 30 if not specified.
- height - number
The height of the node layout. Defaults to 30 if not specified.
Gets or sets the bounds of the node layout.
A
Rect representing the bounds of the node layout.
Gets or sets the position of the layout's center.
The position of the layout's center.
Gets or sets the x-coordinate of the center of the node layout.
The x-coordinate of the layout's center.
Gets or sets the y-coordinate of the center of the node layout.
The y-coordinate of the layout's center.
Gets or sets the height of the node layout.
The height represents the vertical span of the node.
The height of the node layout.
Gets or sets the size of the node layout.
Adjusting the size of the layout will preserve the position of the layout's top-left corner. Consequently, the positions of the layout's center and other corners may change.
A
Size representing the size of the layout.
Gets or sets the position of the layout's top-left corner.
The position of the layout's top-left corner as a
Point.
Gets or sets the width of the node layout.
The width represents the horizontal span of the node.
The width of the node layout.
Gets or sets the x-coordinate of the upper-left corner of the node layout.
The location is described by the coordinates of the upper-left corner.
The x-coordinate of the node layout.
Gets or sets the y-coordinate of the upper-left corner of the node layout.
The location is described by the coordinates of the upper-left corner.
The y-coordinate of the node layout.