laymur 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/UIElement.d.ts +16 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -69,6 +69,22 @@ export declare abstract class UIElement extends UIAnchor implements UIPlaneEleme
|
|
|
69
69
|
* @returns The current height dimension
|
|
70
70
|
*/
|
|
71
71
|
get height(): number;
|
|
72
|
+
/**
|
|
73
|
+
* The right edge X coordinate of this element (x + width).
|
|
74
|
+
*/
|
|
75
|
+
get oppositeX(): number;
|
|
76
|
+
/**
|
|
77
|
+
* The bottom edge Y coordinate of this element (y + height).
|
|
78
|
+
*/
|
|
79
|
+
get oppositeY(): number;
|
|
80
|
+
/**
|
|
81
|
+
* The X coordinate of the center of this element.
|
|
82
|
+
*/
|
|
83
|
+
get centerX(): number;
|
|
84
|
+
/**
|
|
85
|
+
* The Y coordinate of the center of this element.
|
|
86
|
+
*/
|
|
87
|
+
get centerY(): number;
|
|
72
88
|
/**
|
|
73
89
|
* Gets the current z-index (depth) value.
|
|
74
90
|
* @returns The current z-index value
|
package/dist/index.js
CHANGED
|
@@ -4807,6 +4807,30 @@ class UIElement extends UIAnchor {
|
|
|
4807
4807
|
get height() {
|
|
4808
4808
|
return this.solverWrapper.readVariableValue(this.hVariable);
|
|
4809
4809
|
}
|
|
4810
|
+
/**
|
|
4811
|
+
* The right edge X coordinate of this element (x + width).
|
|
4812
|
+
*/
|
|
4813
|
+
get oppositeX() {
|
|
4814
|
+
return this.x + this.width;
|
|
4815
|
+
}
|
|
4816
|
+
/**
|
|
4817
|
+
* The bottom edge Y coordinate of this element (y + height).
|
|
4818
|
+
*/
|
|
4819
|
+
get oppositeY() {
|
|
4820
|
+
return this.y + this.height;
|
|
4821
|
+
}
|
|
4822
|
+
/**
|
|
4823
|
+
* The X coordinate of the center of this element.
|
|
4824
|
+
*/
|
|
4825
|
+
get centerX() {
|
|
4826
|
+
return this.x + this.width / 2;
|
|
4827
|
+
}
|
|
4828
|
+
/**
|
|
4829
|
+
* The Y coordinate of the center of this element.
|
|
4830
|
+
*/
|
|
4831
|
+
get centerY() {
|
|
4832
|
+
return this.y + this.height / 2;
|
|
4833
|
+
}
|
|
4810
4834
|
/**
|
|
4811
4835
|
* Gets the current z-index (depth) value.
|
|
4812
4836
|
* @returns The current z-index value
|