@onerjs/gui 8.31.4 → 8.31.5
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/2D/controls/control.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ export declare class Control implements IAnimatable, IFocusableControl {
|
|
|
91
91
|
/** @internal */
|
|
92
92
|
_invertTransformMatrix: Matrix2D;
|
|
93
93
|
/** @internal */
|
|
94
|
+
_noRootTransformMatrix: Matrix2D;
|
|
95
|
+
/** @internal */
|
|
94
96
|
protected _transformedPosition: Vector2;
|
|
95
97
|
private _isMatrixDirty;
|
|
96
98
|
private _cachedOffsetX;
|
|
@@ -116,6 +118,7 @@ export declare class Control implements IAnimatable, IFocusableControl {
|
|
|
116
118
|
private _gradient;
|
|
117
119
|
/** @internal */
|
|
118
120
|
protected _rebuildLayout: boolean;
|
|
121
|
+
private _transformedMeasure;
|
|
119
122
|
isRoot: boolean;
|
|
120
123
|
/** @internal */
|
|
121
124
|
protected _urlRewriter?: (url: string) => string;
|
package/2D/controls/control.js
CHANGED
|
@@ -30,7 +30,7 @@ export class Control {
|
|
|
30
30
|
* Gets the transformed measure, that is the bounding box of the control after applying all transformations
|
|
31
31
|
*/
|
|
32
32
|
get transformedMeasure() {
|
|
33
|
-
return this.
|
|
33
|
+
return this._transformedMeasure;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
|
|
@@ -967,14 +967,8 @@ export class Control {
|
|
|
967
967
|
this._transformMatrix = Matrix2D.Identity();
|
|
968
968
|
/** @internal */
|
|
969
969
|
this._invertTransformMatrix = Matrix2D.Identity();
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
// /** @internal */
|
|
973
|
-
// public _invertTransformMatrix2 = Matrix2D.Identity();
|
|
974
|
-
// /** @internal */
|
|
975
|
-
// private _cachedOffsetX2: number;
|
|
976
|
-
// /** @internal */
|
|
977
|
-
// private _cachedOffsetY2: number;
|
|
970
|
+
/** @internal */
|
|
971
|
+
this._noRootTransformMatrix = Matrix2D.Identity();
|
|
978
972
|
/** @internal */
|
|
979
973
|
this._transformedPosition = Vector2.Zero();
|
|
980
974
|
this._isMatrixDirty = true;
|
|
@@ -997,6 +991,7 @@ export class Control {
|
|
|
997
991
|
this._gradient = null;
|
|
998
992
|
/** @internal */
|
|
999
993
|
this._rebuildLayout = false;
|
|
994
|
+
this._transformedMeasure = Measure.Empty();
|
|
1000
995
|
this.isRoot = false;
|
|
1001
996
|
/**
|
|
1002
997
|
* Observable that fires when the control's enabled state changes
|
|
@@ -1480,9 +1475,16 @@ export class Control {
|
|
|
1480
1475
|
this._cachedOffsetY = offsetY;
|
|
1481
1476
|
this._isMatrixDirty = false;
|
|
1482
1477
|
this._flagDescendantsAsMatrixDirty();
|
|
1483
|
-
Matrix2D.ComposeToRef(-offsetX, -offsetY, this.
|
|
1478
|
+
Matrix2D.ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._transformMatrix : null, this._transformMatrix);
|
|
1479
|
+
if (this.isRoot) {
|
|
1480
|
+
Matrix2D.ComposeToRef(-offsetX, -offsetY, 0, 1, 1, null, this._noRootTransformMatrix);
|
|
1481
|
+
}
|
|
1482
|
+
else {
|
|
1483
|
+
Matrix2D.ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._noRootTransformMatrix : null, this._noRootTransformMatrix);
|
|
1484
|
+
}
|
|
1484
1485
|
this._transformMatrix.invertToRef(this._invertTransformMatrix);
|
|
1485
1486
|
this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);
|
|
1487
|
+
this._currentMeasure.transformToRef(this._noRootTransformMatrix, this._transformedMeasure);
|
|
1486
1488
|
}
|
|
1487
1489
|
}
|
|
1488
1490
|
/**
|