@babylonjs/gui 5.24.0 → 5.25.0
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/advancedDynamicTexture.d.ts +19 -28
- package/2D/advancedDynamicTexture.js +16 -25
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.d.ts +6 -32
- package/2D/controls/button.js +6 -32
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.d.ts +2 -8
- package/2D/controls/checkbox.js +2 -8
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.d.ts +2 -4
- package/2D/controls/colorpicker.js +2 -4
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.d.ts +20 -43
- package/2D/controls/container.js +20 -43
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.d.ts +71 -144
- package/2D/controls/control.js +67 -140
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/focusableButton.d.ts +4 -9
- package/2D/controls/focusableButton.js +4 -9
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/grid.d.ts +1 -3
- package/2D/controls/grid.js +1 -3
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.d.ts +1 -3
- package/2D/controls/image.js +1 -3
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/inputText.d.ts +10 -18
- package/2D/controls/inputText.js +9 -17
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/inputTextArea.d.ts +10 -10
- package/2D/controls/inputTextArea.js +9 -9
- package/2D/controls/inputTextArea.js.map +1 -1
- package/2D/controls/rectangle.d.ts +2 -2
- package/2D/controls/rectangle.js +2 -2
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.d.ts +3 -7
- package/2D/controls/scrollViewers/scrollViewer.js +3 -7
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +4 -10
- package/2D/controls/scrollViewers/scrollViewerWindow.js +4 -10
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.d.ts +14 -40
- package/2D/controls/selector.js +14 -40
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.d.ts +1 -3
- package/2D/controls/sliders/baseSlider.js +1 -3
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.d.ts +1 -3
- package/2D/controls/sliders/imageBasedSlider.js +1 -3
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.d.ts +1 -3
- package/2D/controls/sliders/imageScrollBar.js +1 -3
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.d.ts +1 -3
- package/2D/controls/sliders/scrollBar.js +1 -3
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/stackPanel.d.ts +2 -6
- package/2D/controls/stackPanel.js +2 -6
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.d.ts +1 -1
- package/2D/controls/statics.js +1 -1
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.d.ts +1 -2
- package/2D/controls/textBlock.js +1 -2
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.d.ts +1 -1
- package/2D/controls/textWrapper.js +1 -1
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.d.ts +5 -29
- package/2D/controls/toggleButton.js +5 -29
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.d.ts +1 -3
- package/2D/controls/virtualKeyboard.js +1 -3
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/multiLinePoint.d.ts +1 -1
- package/2D/multiLinePoint.js.map +1 -1
- package/2D/style.d.ts +2 -2
- package/2D/style.js +1 -1
- package/2D/style.js.map +1 -1
- package/3D/controls/button3D.d.ts +1 -1
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/control3D.d.ts +11 -31
- package/3D/controls/control3D.js +10 -30
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/holographicSlate.d.ts +5 -6
- package/3D/controls/holographicSlate.js +3 -4
- package/3D/controls/holographicSlate.js.map +1 -1
- package/3D/controls/meshButton3D.d.ts +1 -1
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/touchButton3D.d.ts +1 -4
- package/3D/controls/touchButton3D.js +1 -4
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchMeshButton3D.d.ts +1 -1
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/gizmos/gizmoHandle.d.ts +1 -1
- package/3D/gizmos/gizmoHandle.js.map +1 -1
- package/3D/gui3DManager.d.ts +5 -5
- package/3D/gui3DManager.js +4 -4
- package/3D/gui3DManager.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.d.ts +1 -1
- package/3D/materials/fluent/fluentMaterial.js +1 -1
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.d.ts +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.js +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -1
- package/3D/materials/fluent/shaders/fluent.vertex.d.ts +1 -1
- package/3D/materials/fluent/shaders/fluent.vertex.js +1 -1
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +8 -8
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +9 -9
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -1
- package/3D/materials/handle/handleMaterial.d.ts +1 -1
- package/3D/materials/handle/handleMaterial.js +1 -1
- package/3D/materials/handle/handleMaterial.js.map +1 -1
- package/3D/materials/handle/shaders/handle.fragment.d.ts +1 -1
- package/3D/materials/handle/shaders/handle.fragment.js +1 -1
- package/3D/materials/handle/shaders/handle.fragment.js.map +1 -1
- package/3D/materials/handle/shaders/handle.vertex.d.ts +1 -1
- package/3D/materials/handle/shaders/handle.vertex.js +1 -1
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +8 -8
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +9 -9
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +10 -10
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +11 -11
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +10 -10
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +11 -11
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -1
- package/package.json +2 -2
package/2D/controls/control.js
CHANGED
|
@@ -27,53 +27,53 @@ export class Control {
|
|
|
27
27
|
this._alpha = 1;
|
|
28
28
|
this._alphaSet = false;
|
|
29
29
|
this._zIndex = 0;
|
|
30
|
-
/** @
|
|
30
|
+
/** @internal */
|
|
31
31
|
this._currentMeasure = Measure.Empty();
|
|
32
|
-
/** @
|
|
32
|
+
/** @internal */
|
|
33
33
|
this._tempPaddingMeasure = Measure.Empty();
|
|
34
34
|
this._fontFamily = "Arial";
|
|
35
35
|
this._fontStyle = "";
|
|
36
36
|
this._fontWeight = "";
|
|
37
37
|
this._fontSize = new ValueAndUnit(18, ValueAndUnit.UNITMODE_PIXEL, false);
|
|
38
|
-
/** @
|
|
38
|
+
/** @internal */
|
|
39
39
|
this._width = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
|
|
40
|
-
/** @
|
|
40
|
+
/** @internal */
|
|
41
41
|
this._height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
|
|
42
42
|
this._color = "";
|
|
43
43
|
this._style = null;
|
|
44
|
-
/** @
|
|
44
|
+
/** @internal */
|
|
45
45
|
this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
|
|
46
|
-
/** @
|
|
46
|
+
/** @internal */
|
|
47
47
|
this._verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
|
|
48
|
-
/** @
|
|
48
|
+
/** @internal */
|
|
49
49
|
this._isDirty = true;
|
|
50
|
-
/** @
|
|
50
|
+
/** @internal */
|
|
51
51
|
this._wasDirty = false;
|
|
52
|
-
/** @
|
|
52
|
+
/** @internal */
|
|
53
53
|
this._tempParentMeasure = Measure.Empty();
|
|
54
|
-
/** @
|
|
54
|
+
/** @internal */
|
|
55
55
|
this._prevCurrentMeasureTransformedIntoGlobalSpace = Measure.Empty();
|
|
56
|
-
/** @
|
|
56
|
+
/** @internal */
|
|
57
57
|
this._cachedParentMeasure = Measure.Empty();
|
|
58
58
|
this._descendantsOnlyPadding = false;
|
|
59
59
|
this._paddingLeft = new ValueAndUnit(0);
|
|
60
60
|
this._paddingRight = new ValueAndUnit(0);
|
|
61
61
|
this._paddingTop = new ValueAndUnit(0);
|
|
62
62
|
this._paddingBottom = new ValueAndUnit(0);
|
|
63
|
-
/** @
|
|
63
|
+
/** @internal */
|
|
64
64
|
this._left = new ValueAndUnit(0);
|
|
65
|
-
/** @
|
|
65
|
+
/** @internal */
|
|
66
66
|
this._top = new ValueAndUnit(0);
|
|
67
67
|
this._scaleX = 1.0;
|
|
68
68
|
this._scaleY = 1.0;
|
|
69
69
|
this._rotation = 0;
|
|
70
70
|
this._transformCenterX = 0.5;
|
|
71
71
|
this._transformCenterY = 0.5;
|
|
72
|
-
/** @
|
|
72
|
+
/** @internal */
|
|
73
73
|
this._transformMatrix = Matrix2D.Identity();
|
|
74
|
-
/** @
|
|
74
|
+
/** @internal */
|
|
75
75
|
this._invertTransformMatrix = Matrix2D.Identity();
|
|
76
|
-
/** @
|
|
76
|
+
/** @internal */
|
|
77
77
|
this._transformedPosition = Vector2.Zero();
|
|
78
78
|
this._isMatrixDirty = true;
|
|
79
79
|
this._isVisible = true;
|
|
@@ -92,13 +92,13 @@ export class Control {
|
|
|
92
92
|
this._disabledColor = "#9a9a9a";
|
|
93
93
|
this._disabledColorItem = "#6a6a6a";
|
|
94
94
|
this._isReadOnly = false;
|
|
95
|
-
/** @
|
|
95
|
+
/** @internal */
|
|
96
96
|
this._rebuildLayout = false;
|
|
97
|
-
/** @
|
|
97
|
+
/** @internal */
|
|
98
98
|
this._customData = {};
|
|
99
|
-
/** @
|
|
99
|
+
/** @internal */
|
|
100
100
|
this._isClipped = false;
|
|
101
|
-
/** @
|
|
101
|
+
/** @internal */
|
|
102
102
|
this._automaticSize = false;
|
|
103
103
|
/**
|
|
104
104
|
* Gets or sets an object used to store user defined information for the node
|
|
@@ -137,9 +137,9 @@ export class Control {
|
|
|
137
137
|
this._shadowColor = "black";
|
|
138
138
|
/** Gets or sets the cursor to use when the control is hovered */
|
|
139
139
|
this.hoverCursor = "";
|
|
140
|
-
/** @
|
|
140
|
+
/** @internal */
|
|
141
141
|
this._linkOffsetX = new ValueAndUnit(0);
|
|
142
|
-
/** @
|
|
142
|
+
/** @internal */
|
|
143
143
|
this._linkOffsetY = new ValueAndUnit(0);
|
|
144
144
|
/**
|
|
145
145
|
* An event triggered when pointer wheel is scrolled
|
|
@@ -545,7 +545,7 @@ export class Control {
|
|
|
545
545
|
this._markAsDirty();
|
|
546
546
|
this._resetFontCache();
|
|
547
547
|
}
|
|
548
|
-
/** @
|
|
548
|
+
/** @internal */
|
|
549
549
|
get _isFontSizeInPercentage() {
|
|
550
550
|
return this._fontSize.isPercentage;
|
|
551
551
|
}
|
|
@@ -671,7 +671,7 @@ export class Control {
|
|
|
671
671
|
}
|
|
672
672
|
this.paddingLeft = value + "px";
|
|
673
673
|
}
|
|
674
|
-
/** @
|
|
674
|
+
/** @internal */
|
|
675
675
|
get _paddingLeftInPixels() {
|
|
676
676
|
if (this._descendantsOnlyPadding) {
|
|
677
677
|
return 0;
|
|
@@ -703,7 +703,7 @@ export class Control {
|
|
|
703
703
|
}
|
|
704
704
|
this.paddingRight = value + "px";
|
|
705
705
|
}
|
|
706
|
-
/** @
|
|
706
|
+
/** @internal */
|
|
707
707
|
get _paddingRightInPixels() {
|
|
708
708
|
if (this._descendantsOnlyPadding) {
|
|
709
709
|
return 0;
|
|
@@ -735,7 +735,7 @@ export class Control {
|
|
|
735
735
|
}
|
|
736
736
|
this.paddingTop = value + "px";
|
|
737
737
|
}
|
|
738
|
-
/** @
|
|
738
|
+
/** @internal */
|
|
739
739
|
get _paddingTopInPixels() {
|
|
740
740
|
if (this._descendantsOnlyPadding) {
|
|
741
741
|
return 0;
|
|
@@ -767,7 +767,7 @@ export class Control {
|
|
|
767
767
|
}
|
|
768
768
|
this.paddingBottom = value + "px";
|
|
769
769
|
}
|
|
770
|
-
/** @
|
|
770
|
+
/** @internal */
|
|
771
771
|
get _paddingBottomInPixels() {
|
|
772
772
|
if (this._descendantsOnlyPadding) {
|
|
773
773
|
return 0;
|
|
@@ -931,7 +931,7 @@ export class Control {
|
|
|
931
931
|
this._disabledColorItem = value;
|
|
932
932
|
this._markAsDirty();
|
|
933
933
|
}
|
|
934
|
-
/** @
|
|
934
|
+
/** @internal */
|
|
935
935
|
_getTypeName() {
|
|
936
936
|
return "Control";
|
|
937
937
|
}
|
|
@@ -962,7 +962,7 @@ export class Control {
|
|
|
962
962
|
markAllAsDirty() {
|
|
963
963
|
this._markAllAsDirty();
|
|
964
964
|
}
|
|
965
|
-
/** @
|
|
965
|
+
/** @internal */
|
|
966
966
|
_resetFontCache() {
|
|
967
967
|
this._fontSet = true;
|
|
968
968
|
this._markAsDirty();
|
|
@@ -1119,8 +1119,7 @@ export class Control {
|
|
|
1119
1119
|
this.paddingLeftInPixels = left;
|
|
1120
1120
|
}
|
|
1121
1121
|
/**
|
|
1122
|
-
* @
|
|
1123
|
-
* @hidden
|
|
1122
|
+
* @internal
|
|
1124
1123
|
*/
|
|
1125
1124
|
_moveToProjectedPosition(projectedPosition) {
|
|
1126
1125
|
const oldLeft = this._left.getValue(this._host);
|
|
@@ -1146,34 +1145,30 @@ export class Control {
|
|
|
1146
1145
|
this._markAsDirty();
|
|
1147
1146
|
}
|
|
1148
1147
|
/**
|
|
1149
|
-
* @
|
|
1150
|
-
* @hidden
|
|
1148
|
+
* @internal
|
|
1151
1149
|
*/
|
|
1152
1150
|
_offsetLeft(offset) {
|
|
1153
1151
|
this._isDirty = true;
|
|
1154
1152
|
this._currentMeasure.left += offset;
|
|
1155
1153
|
}
|
|
1156
1154
|
/**
|
|
1157
|
-
* @
|
|
1158
|
-
* @hidden
|
|
1155
|
+
* @internal
|
|
1159
1156
|
*/
|
|
1160
1157
|
_offsetTop(offset) {
|
|
1161
1158
|
this._isDirty = true;
|
|
1162
1159
|
this._currentMeasure.top += offset;
|
|
1163
1160
|
}
|
|
1164
|
-
/** @
|
|
1161
|
+
/** @internal */
|
|
1165
1162
|
_markMatrixAsDirty() {
|
|
1166
1163
|
this._isMatrixDirty = true;
|
|
1167
1164
|
this._flagDescendantsAsMatrixDirty();
|
|
1168
1165
|
}
|
|
1169
|
-
/** @
|
|
1166
|
+
/** @internal */
|
|
1170
1167
|
_flagDescendantsAsMatrixDirty() {
|
|
1171
1168
|
// No child
|
|
1172
1169
|
}
|
|
1173
1170
|
/**
|
|
1174
|
-
* @
|
|
1175
|
-
* @param context
|
|
1176
|
-
* @hidden
|
|
1171
|
+
* @internal
|
|
1177
1172
|
*/
|
|
1178
1173
|
_intersectsRect(rect, context) {
|
|
1179
1174
|
// make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.
|
|
@@ -1192,15 +1187,15 @@ export class Control {
|
|
|
1192
1187
|
}
|
|
1193
1188
|
return true;
|
|
1194
1189
|
}
|
|
1195
|
-
/** @
|
|
1190
|
+
/** @internal */
|
|
1196
1191
|
_computeAdditionnalOffsetX() {
|
|
1197
1192
|
return 0;
|
|
1198
1193
|
}
|
|
1199
|
-
/** @
|
|
1194
|
+
/** @internal */
|
|
1200
1195
|
_computeAdditionnalOffsetY() {
|
|
1201
1196
|
return 0;
|
|
1202
1197
|
}
|
|
1203
|
-
/** @
|
|
1198
|
+
/** @internal */
|
|
1204
1199
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1205
1200
|
invalidateRect() {
|
|
1206
1201
|
this._transform();
|
|
@@ -1224,8 +1219,7 @@ export class Control {
|
|
|
1224
1219
|
}
|
|
1225
1220
|
}
|
|
1226
1221
|
/**
|
|
1227
|
-
* @
|
|
1228
|
-
* @hidden
|
|
1222
|
+
* @internal
|
|
1229
1223
|
*/
|
|
1230
1224
|
_markAsDirty(force = false) {
|
|
1231
1225
|
if (!this._isVisible && !force) {
|
|
@@ -1238,7 +1232,7 @@ export class Control {
|
|
|
1238
1232
|
this._host.markAsDirty();
|
|
1239
1233
|
}
|
|
1240
1234
|
}
|
|
1241
|
-
/** @
|
|
1235
|
+
/** @internal */
|
|
1242
1236
|
_markAllAsDirty() {
|
|
1243
1237
|
this._markAsDirty();
|
|
1244
1238
|
if (this._font) {
|
|
@@ -1246,8 +1240,7 @@ export class Control {
|
|
|
1246
1240
|
}
|
|
1247
1241
|
}
|
|
1248
1242
|
/**
|
|
1249
|
-
* @
|
|
1250
|
-
* @hidden
|
|
1243
|
+
* @internal
|
|
1251
1244
|
*/
|
|
1252
1245
|
_link(host) {
|
|
1253
1246
|
this._host = host;
|
|
@@ -1256,8 +1249,7 @@ export class Control {
|
|
|
1256
1249
|
}
|
|
1257
1250
|
}
|
|
1258
1251
|
/**
|
|
1259
|
-
* @
|
|
1260
|
-
* @hidden
|
|
1252
|
+
* @internal
|
|
1261
1253
|
*/
|
|
1262
1254
|
_transform(context) {
|
|
1263
1255
|
if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {
|
|
@@ -1287,8 +1279,7 @@ export class Control {
|
|
|
1287
1279
|
}
|
|
1288
1280
|
}
|
|
1289
1281
|
/**
|
|
1290
|
-
* @
|
|
1291
|
-
* @hidden
|
|
1282
|
+
* @internal
|
|
1292
1283
|
*/
|
|
1293
1284
|
_renderHighlight(context) {
|
|
1294
1285
|
if (!this.isHighlighted) {
|
|
@@ -1301,15 +1292,13 @@ export class Control {
|
|
|
1301
1292
|
context.restore();
|
|
1302
1293
|
}
|
|
1303
1294
|
/**
|
|
1304
|
-
* @
|
|
1305
|
-
* @hidden
|
|
1295
|
+
* @internal
|
|
1306
1296
|
*/
|
|
1307
1297
|
_renderHighlightSpecific(context) {
|
|
1308
1298
|
context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
|
|
1309
1299
|
}
|
|
1310
1300
|
/**
|
|
1311
|
-
* @
|
|
1312
|
-
* @hidden
|
|
1301
|
+
* @internal
|
|
1313
1302
|
*/
|
|
1314
1303
|
_applyStates(context) {
|
|
1315
1304
|
if (this._isFontSizeInPercentage) {
|
|
@@ -1336,9 +1325,7 @@ export class Control {
|
|
|
1336
1325
|
}
|
|
1337
1326
|
}
|
|
1338
1327
|
/**
|
|
1339
|
-
* @
|
|
1340
|
-
* @param context
|
|
1341
|
-
* @hidden
|
|
1328
|
+
* @internal
|
|
1342
1329
|
*/
|
|
1343
1330
|
_layout(parentMeasure, context) {
|
|
1344
1331
|
if (!this.isDirty && (!this.isVisible || this.notRenderable)) {
|
|
@@ -1367,9 +1354,7 @@ export class Control {
|
|
|
1367
1354
|
return true;
|
|
1368
1355
|
}
|
|
1369
1356
|
/**
|
|
1370
|
-
* @
|
|
1371
|
-
* @param context
|
|
1372
|
-
* @hidden
|
|
1357
|
+
* @internal
|
|
1373
1358
|
*/
|
|
1374
1359
|
_processMeasures(parentMeasure, context) {
|
|
1375
1360
|
this._tempPaddingMeasure.copyFrom(parentMeasure);
|
|
@@ -1422,7 +1407,7 @@ export class Control {
|
|
|
1422
1407
|
}
|
|
1423
1408
|
this._isClipped = false;
|
|
1424
1409
|
}
|
|
1425
|
-
/** @
|
|
1410
|
+
/** @internal */
|
|
1426
1411
|
_measure() {
|
|
1427
1412
|
// Width / Height
|
|
1428
1413
|
if (this._width.isPixel) {
|
|
@@ -1447,9 +1432,7 @@ export class Control {
|
|
|
1447
1432
|
}
|
|
1448
1433
|
}
|
|
1449
1434
|
/**
|
|
1450
|
-
* @
|
|
1451
|
-
* @param context
|
|
1452
|
-
* @hidden
|
|
1435
|
+
* @internal
|
|
1453
1436
|
*/
|
|
1454
1437
|
_computeAlignment(parentMeasure, context) {
|
|
1455
1438
|
const width = this._currentMeasure.width;
|
|
@@ -1527,24 +1510,19 @@ export class Control {
|
|
|
1527
1510
|
this._currentMeasure.top += y;
|
|
1528
1511
|
}
|
|
1529
1512
|
/**
|
|
1530
|
-
* @
|
|
1531
|
-
* @param context
|
|
1532
|
-
* @hidden
|
|
1513
|
+
* @internal
|
|
1533
1514
|
*/
|
|
1534
1515
|
_preMeasure(parentMeasure, context) {
|
|
1535
1516
|
// Do nothing
|
|
1536
1517
|
}
|
|
1537
1518
|
/**
|
|
1538
|
-
* @
|
|
1539
|
-
* @param context
|
|
1540
|
-
* @hidden
|
|
1519
|
+
* @internal
|
|
1541
1520
|
*/
|
|
1542
1521
|
_additionalProcessing(parentMeasure, context) {
|
|
1543
1522
|
// Do nothing
|
|
1544
1523
|
}
|
|
1545
1524
|
/**
|
|
1546
|
-
* @
|
|
1547
|
-
* @hidden
|
|
1525
|
+
* @internal
|
|
1548
1526
|
*/
|
|
1549
1527
|
_clipForChildren(context) {
|
|
1550
1528
|
// DO nothing
|
|
@@ -1579,9 +1557,7 @@ export class Control {
|
|
|
1579
1557
|
context.clip();
|
|
1580
1558
|
}
|
|
1581
1559
|
/**
|
|
1582
|
-
* @
|
|
1583
|
-
* @param invalidatedRectangle
|
|
1584
|
-
* @hidden
|
|
1560
|
+
* @internal
|
|
1585
1561
|
*/
|
|
1586
1562
|
_render(context, invalidatedRectangle) {
|
|
1587
1563
|
if (!this.isVisible || this.notRenderable || this._isClipped) {
|
|
@@ -1617,9 +1593,7 @@ export class Control {
|
|
|
1617
1593
|
return true;
|
|
1618
1594
|
}
|
|
1619
1595
|
/**
|
|
1620
|
-
* @
|
|
1621
|
-
* @param invalidatedRectangle
|
|
1622
|
-
* @hidden
|
|
1596
|
+
* @internal
|
|
1623
1597
|
*/
|
|
1624
1598
|
_draw(context, invalidatedRectangle) {
|
|
1625
1599
|
// Do nothing
|
|
@@ -1654,15 +1628,7 @@ export class Control {
|
|
|
1654
1628
|
return true;
|
|
1655
1629
|
}
|
|
1656
1630
|
/**
|
|
1657
|
-
* @
|
|
1658
|
-
* @param y
|
|
1659
|
-
* @param pi
|
|
1660
|
-
* @param type
|
|
1661
|
-
* @param pointerId
|
|
1662
|
-
* @param buttonIndex
|
|
1663
|
-
* @param deltaX
|
|
1664
|
-
* @param deltaY
|
|
1665
|
-
* @hidden
|
|
1631
|
+
* @internal
|
|
1666
1632
|
*/
|
|
1667
1633
|
_processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1668
1634
|
if (!this._isEnabled) {
|
|
@@ -1678,11 +1644,7 @@ export class Control {
|
|
|
1678
1644
|
return true;
|
|
1679
1645
|
}
|
|
1680
1646
|
/**
|
|
1681
|
-
* @
|
|
1682
|
-
* @param coordinates
|
|
1683
|
-
* @param pointerId
|
|
1684
|
-
* @param pi
|
|
1685
|
-
* @hidden
|
|
1647
|
+
* @internal
|
|
1686
1648
|
*/
|
|
1687
1649
|
_onPointerMove(target, coordinates, pointerId, pi) {
|
|
1688
1650
|
const canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);
|
|
@@ -1691,9 +1653,7 @@ export class Control {
|
|
|
1691
1653
|
}
|
|
1692
1654
|
}
|
|
1693
1655
|
/**
|
|
1694
|
-
* @
|
|
1695
|
-
* @param pi
|
|
1696
|
-
* @hidden
|
|
1656
|
+
* @internal
|
|
1697
1657
|
*/
|
|
1698
1658
|
_onPointerEnter(target, pi) {
|
|
1699
1659
|
if (!this._isEnabled) {
|
|
@@ -1714,10 +1674,7 @@ export class Control {
|
|
|
1714
1674
|
return true;
|
|
1715
1675
|
}
|
|
1716
1676
|
/**
|
|
1717
|
-
* @
|
|
1718
|
-
* @param pi
|
|
1719
|
-
* @param force
|
|
1720
|
-
* @hidden
|
|
1677
|
+
* @internal
|
|
1721
1678
|
*/
|
|
1722
1679
|
_onPointerOut(target, pi, force = false) {
|
|
1723
1680
|
if (!force && (!this._isEnabled || target === this)) {
|
|
@@ -1733,12 +1690,7 @@ export class Control {
|
|
|
1733
1690
|
}
|
|
1734
1691
|
}
|
|
1735
1692
|
/**
|
|
1736
|
-
* @
|
|
1737
|
-
* @param coordinates
|
|
1738
|
-
* @param pointerId
|
|
1739
|
-
* @param buttonIndex
|
|
1740
|
-
* @param pi
|
|
1741
|
-
* @hidden
|
|
1693
|
+
* @internal
|
|
1742
1694
|
*/
|
|
1743
1695
|
_onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {
|
|
1744
1696
|
// Prevent pointerout to lose control context.
|
|
@@ -1759,13 +1711,7 @@ export class Control {
|
|
|
1759
1711
|
return true;
|
|
1760
1712
|
}
|
|
1761
1713
|
/**
|
|
1762
|
-
* @
|
|
1763
|
-
* @param coordinates
|
|
1764
|
-
* @param pointerId
|
|
1765
|
-
* @param buttonIndex
|
|
1766
|
-
* @param notifyClick
|
|
1767
|
-
* @param pi
|
|
1768
|
-
* @hidden
|
|
1714
|
+
* @internal
|
|
1769
1715
|
*/
|
|
1770
1716
|
_onPointerUp(target, coordinates, pointerId, buttonIndex, notifyClick, pi) {
|
|
1771
1717
|
if (!this._isEnabled) {
|
|
@@ -1786,8 +1732,7 @@ export class Control {
|
|
|
1786
1732
|
}
|
|
1787
1733
|
}
|
|
1788
1734
|
/**
|
|
1789
|
-
* @
|
|
1790
|
-
* @hidden
|
|
1735
|
+
* @internal
|
|
1791
1736
|
*/
|
|
1792
1737
|
_forcePointerUp(pointerId = null) {
|
|
1793
1738
|
if (pointerId !== null) {
|
|
@@ -1800,9 +1745,7 @@ export class Control {
|
|
|
1800
1745
|
}
|
|
1801
1746
|
}
|
|
1802
1747
|
/**
|
|
1803
|
-
* @
|
|
1804
|
-
* @param deltaY
|
|
1805
|
-
* @hidden
|
|
1748
|
+
* @internal
|
|
1806
1749
|
*/
|
|
1807
1750
|
_onWheelScroll(deltaX, deltaY) {
|
|
1808
1751
|
if (!this._isEnabled) {
|
|
@@ -1813,18 +1756,10 @@ export class Control {
|
|
|
1813
1756
|
this.parent._onWheelScroll(deltaX, deltaY);
|
|
1814
1757
|
}
|
|
1815
1758
|
}
|
|
1816
|
-
/** @
|
|
1759
|
+
/** @internal */
|
|
1817
1760
|
_onCanvasBlur() { }
|
|
1818
1761
|
/**
|
|
1819
|
-
* @
|
|
1820
|
-
* @param x
|
|
1821
|
-
* @param y
|
|
1822
|
-
* @param pi
|
|
1823
|
-
* @param pointerId
|
|
1824
|
-
* @param buttonIndex
|
|
1825
|
-
* @param deltaX
|
|
1826
|
-
* @param deltaY
|
|
1827
|
-
* @hidden
|
|
1762
|
+
* @internal
|
|
1828
1763
|
*/
|
|
1829
1764
|
_processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1830
1765
|
if (!this._isEnabled) {
|
|
@@ -1894,9 +1829,7 @@ export class Control {
|
|
|
1894
1829
|
}
|
|
1895
1830
|
}
|
|
1896
1831
|
/**
|
|
1897
|
-
* @
|
|
1898
|
-
* @param host
|
|
1899
|
-
* @hidden
|
|
1832
|
+
* @internal
|
|
1900
1833
|
*/
|
|
1901
1834
|
_parseFromContent(serializedObject, host) {
|
|
1902
1835
|
if (serializedObject.fontFamily) {
|
|
@@ -1967,8 +1900,7 @@ export class Control {
|
|
|
1967
1900
|
return Control._VERTICAL_ALIGNMENT_CENTER;
|
|
1968
1901
|
}
|
|
1969
1902
|
/**
|
|
1970
|
-
* @
|
|
1971
|
-
* @hidden
|
|
1903
|
+
* @internal
|
|
1972
1904
|
*/
|
|
1973
1905
|
static _GetFontOffset(font) {
|
|
1974
1906
|
if (Control._FontHeightSizes[font]) {
|
|
@@ -1996,12 +1928,7 @@ export class Control {
|
|
|
1996
1928
|
return control;
|
|
1997
1929
|
}
|
|
1998
1930
|
/**
|
|
1999
|
-
* @
|
|
2000
|
-
* @param y
|
|
2001
|
-
* @param width
|
|
2002
|
-
* @param height
|
|
2003
|
-
* @param context
|
|
2004
|
-
* @hidden
|
|
1931
|
+
* @internal
|
|
2005
1932
|
*/
|
|
2006
1933
|
static drawEllipse(x, y, width, height, context) {
|
|
2007
1934
|
context.translate(x, y);
|