@babylonjs/gui 5.0.0-rc.3 → 5.0.0-rc.6
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/adtInstrumentation.d.ts +2 -2
- package/2D/adtInstrumentation.js.map +1 -1
- package/2D/advancedDynamicTexture.d.ts +43 -20
- package/2D/advancedDynamicTexture.js +45 -22
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.d.ts +50 -12
- package/2D/controls/button.js +48 -10
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.d.ts +17 -9
- package/2D/controls/checkbox.js +17 -7
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.d.ts +21 -8
- package/2D/controls/colorpicker.js +540 -523
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.d.ts +63 -18
- package/2D/controls/container.js +63 -18
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.d.ts +172 -49
- package/2D/controls/control.js +166 -41
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/displayGrid.d.ts +2 -4
- package/2D/controls/displayGrid.js +3 -3
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/ellipse.d.ts +1 -1
- package/2D/controls/ellipse.js +2 -2
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/focusableButton.d.ts +13 -6
- package/2D/controls/focusableButton.js +10 -3
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/focusableControl.d.ts +11 -11
- package/2D/controls/focusableControl.js.map +1 -1
- package/2D/controls/grid.d.ts +7 -3
- package/2D/controls/grid.js +9 -5
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.d.ts +15 -8
- package/2D/controls/image.js +29 -21
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/index.js.map +1 -1
- package/2D/controls/inputPassword.d.ts +1 -1
- package/2D/controls/inputPassword.js +2 -2
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputText.d.ts +34 -15
- package/2D/controls/inputText.js +47 -24
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/line.d.ts +4 -4
- package/2D/controls/line.js +5 -5
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/multiLine.d.ts +9 -11
- package/2D/controls/multiLine.js +8 -8
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/radioButton.d.ts +4 -4
- package/2D/controls/radioButton.js +2 -2
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/rectangle.d.ts +1 -1
- package/2D/controls/rectangle.js +2 -2
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.d.ts +14 -7
- package/2D/controls/scrollViewers/scrollViewer.js +14 -13
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +20 -8
- package/2D/controls/scrollViewers/scrollViewerWindow.js +25 -10
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.d.ts +79 -25
- package/2D/controls/selector.js +93 -30
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.d.ts +9 -5
- package/2D/controls/sliders/baseSlider.js +11 -7
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.d.ts +10 -8
- package/2D/controls/sliders/imageBasedSlider.js +10 -6
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.d.ts +8 -4
- package/2D/controls/sliders/imageScrollBar.js +10 -3
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.d.ts +8 -4
- package/2D/controls/sliders/scrollBar.js +10 -3
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/slider.d.ts +2 -4
- package/2D/controls/sliders/slider.js +6 -6
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/stackPanel.d.ts +11 -3
- package/2D/controls/stackPanel.js +16 -6
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.js +2 -0
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.d.ts +9 -6
- package/2D/controls/textBlock.js +11 -6
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.d.ts +43 -9
- package/2D/controls/toggleButton.js +40 -6
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.d.ts +2 -2
- package/2D/controls/virtualKeyboard.js +6 -6
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/index.js.map +1 -1
- package/2D/math2D.d.ts +2 -2
- package/2D/math2D.js +2 -2
- package/2D/math2D.js.map +1 -1
- package/2D/measure.d.ts +4 -4
- package/2D/measure.js +6 -16
- package/2D/measure.js.map +1 -1
- package/2D/multiLinePoint.d.ts +3 -3
- package/2D/multiLinePoint.js +3 -3
- package/2D/multiLinePoint.js.map +1 -1
- package/2D/style.d.ts +2 -2
- package/2D/style.js.map +1 -1
- package/2D/valueAndUnit.d.ts +1 -1
- package/2D/valueAndUnit.js +8 -4
- package/2D/valueAndUnit.js.map +1 -1
- package/2D/xmlLoader.d.ts +10 -10
- package/2D/xmlLoader.js +17 -17
- package/2D/xmlLoader.js.map +1 -1
- package/3D/behaviors/defaultBehavior.d.ts +7 -7
- package/3D/behaviors/defaultBehavior.js.map +1 -1
- package/3D/controls/abstractButton3D.d.ts +2 -2
- package/3D/controls/abstractButton3D.js +1 -1
- package/3D/controls/abstractButton3D.js.map +1 -1
- package/3D/controls/button3D.d.ts +4 -4
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/container3D.d.ts +3 -3
- package/3D/controls/container3D.js +1 -2
- package/3D/controls/container3D.js.map +1 -1
- package/3D/controls/contentDisplay3D.js +1 -0
- package/3D/controls/contentDisplay3D.js.map +1 -1
- package/3D/controls/control3D.d.ts +53 -17
- package/3D/controls/control3D.js +48 -11
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/cylinderPanel.d.ts +2 -2
- package/3D/controls/cylinderPanel.js +2 -2
- package/3D/controls/cylinderPanel.js.map +1 -1
- package/3D/controls/handMenu.d.ts +5 -5
- package/3D/controls/handMenu.js.map +1 -1
- package/3D/controls/holographicBackplate.d.ts +4 -3
- package/3D/controls/holographicBackplate.js +4 -4
- package/3D/controls/holographicBackplate.js.map +1 -1
- package/3D/controls/holographicButton.d.ts +6 -5
- package/3D/controls/holographicButton.js +1 -0
- package/3D/controls/holographicButton.js.map +1 -1
- package/3D/controls/holographicSlate.d.ts +10 -7
- package/3D/controls/holographicSlate.js +17 -14
- package/3D/controls/holographicSlate.js.map +1 -1
- package/3D/controls/index.js.map +1 -1
- package/3D/controls/meshButton3D.d.ts +4 -4
- package/3D/controls/meshButton3D.js +3 -2
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/nearMenu.d.ts +5 -5
- package/3D/controls/nearMenu.js +6 -4
- package/3D/controls/nearMenu.js.map +1 -1
- package/3D/controls/planePanel.d.ts +1 -1
- package/3D/controls/planePanel.js.map +1 -1
- package/3D/controls/scatterPanel.d.ts +2 -2
- package/3D/controls/scatterPanel.js +1 -1
- package/3D/controls/scatterPanel.js.map +1 -1
- package/3D/controls/slider3D.d.ts +5 -5
- package/3D/controls/slider3D.js +8 -9
- package/3D/controls/slider3D.js.map +1 -1
- package/3D/controls/spherePanel.d.ts +2 -2
- package/3D/controls/spherePanel.js +2 -2
- package/3D/controls/spherePanel.js.map +1 -1
- package/3D/controls/stackPanel3D.js +3 -3
- package/3D/controls/stackPanel3D.js.map +1 -1
- package/3D/controls/touchButton3D.d.ts +12 -7
- package/3D/controls/touchButton3D.js +11 -5
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchHolographicButton.d.ts +7 -6
- package/3D/controls/touchHolographicButton.js +7 -7
- package/3D/controls/touchHolographicButton.js.map +1 -1
- package/3D/controls/touchHolographicMenu.d.ts +6 -6
- package/3D/controls/touchHolographicMenu.js +1 -0
- package/3D/controls/touchHolographicMenu.js.map +1 -1
- package/3D/controls/touchMeshButton3D.d.ts +4 -5
- package/3D/controls/touchMeshButton3D.js +3 -3
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/controls/volumeBasedPanel.d.ts +10 -9
- package/3D/controls/volumeBasedPanel.js +13 -13
- package/3D/controls/volumeBasedPanel.js.map +1 -1
- package/3D/gizmos/gizmoHandle.d.ts +5 -5
- package/3D/gizmos/gizmoHandle.js.map +1 -1
- package/3D/gizmos/index.js.map +1 -1
- package/3D/gizmos/slateGizmo.d.ts +4 -4
- package/3D/gizmos/slateGizmo.js.map +1 -1
- package/3D/gui3DManager.d.ts +7 -7
- package/3D/gui3DManager.js +3 -3
- package/3D/gui3DManager.js.map +1 -1
- package/3D/index.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.d.ts +12 -12
- package/3D/materials/fluent/fluentMaterial.js +17 -6
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluent/index.js.map +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.d.ts +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.js +4 -2
- 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 +4 -2
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +12 -12
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +48 -13
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/index.js.map +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +4 -2
- 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 +4 -2
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +12 -12
- package/3D/materials/fluentButton/fluentButtonMaterial.js +8 -6
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/fluentButton/index.js.map +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +4 -2
- 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 +4 -2
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -1
- package/3D/materials/fluentMaterial.d.ts +1 -1
- package/3D/materials/fluentMaterial.js +1 -1
- package/3D/materials/fluentMaterial.js.map +1 -1
- package/3D/materials/handle/handleMaterial.d.ts +4 -4
- package/3D/materials/handle/handleMaterial.js.map +1 -1
- package/3D/materials/handle/index.js.map +1 -1
- package/3D/materials/handle/shaders/handle.fragment.d.ts +1 -1
- package/3D/materials/handle/shaders/handle.fragment.js +3 -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 +4 -2
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -1
- package/3D/materials/index.js.map +1 -1
- package/3D/materials/mrdl/index.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +15 -15
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +42 -15
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +16 -16
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +88 -23
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +17 -17
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +89 -24
- 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 +4 -2
- 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 +4 -2
- 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 +4 -2
- 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 +4 -2
- 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 +4 -2
- 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 +4 -2
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -1
- package/3D/vector3WithInfo.d.ts +1 -1
- package/3D/vector3WithInfo.js.map +1 -1
- package/index.js.map +1 -1
- package/legacy/legacy.d.ts +1 -1
- package/legacy/legacy.js +3 -3
- package/legacy/legacy.js.map +1 -1
- package/package.json +21 -328
- package/readme.md +2 -2
package/2D/controls/control.js
CHANGED
|
@@ -1202,6 +1202,7 @@ var Control = /** @class */ (function () {
|
|
|
1202
1202
|
* @param force force non visible elements to be marked too
|
|
1203
1203
|
*/
|
|
1204
1204
|
Control.prototype.markAsDirty = function (force) {
|
|
1205
|
+
if (force === void 0) { force = false; }
|
|
1205
1206
|
this._markAsDirty(force);
|
|
1206
1207
|
};
|
|
1207
1208
|
/**
|
|
@@ -1332,7 +1333,7 @@ var Control = /** @class */ (function () {
|
|
|
1332
1333
|
this._host._linkedControls.push(this);
|
|
1333
1334
|
};
|
|
1334
1335
|
/**
|
|
1335
|
-
* Shorthand
|
|
1336
|
+
* Shorthand function to set the top, right, bottom, and left padding values on the control.
|
|
1336
1337
|
* @param { string | number} paddingTop - The value of the top padding.
|
|
1337
1338
|
* @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
|
|
1338
1339
|
* @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
|
|
@@ -1367,7 +1368,10 @@ var Control = /** @class */ (function () {
|
|
|
1367
1368
|
this.paddingBottomInPixels = bottom;
|
|
1368
1369
|
this.paddingLeftInPixels = left;
|
|
1369
1370
|
};
|
|
1370
|
-
/**
|
|
1371
|
+
/**
|
|
1372
|
+
* @param projectedPosition
|
|
1373
|
+
* @hidden
|
|
1374
|
+
*/
|
|
1371
1375
|
Control.prototype._moveToProjectedPosition = function (projectedPosition) {
|
|
1372
1376
|
var _a;
|
|
1373
1377
|
var oldLeft = this._left.getValue(this._host);
|
|
@@ -1392,12 +1396,18 @@ var Control = /** @class */ (function () {
|
|
|
1392
1396
|
this._top.ignoreAdaptiveScaling = true;
|
|
1393
1397
|
this._markAsDirty();
|
|
1394
1398
|
};
|
|
1395
|
-
/**
|
|
1399
|
+
/**
|
|
1400
|
+
* @param offset
|
|
1401
|
+
* @hidden
|
|
1402
|
+
*/
|
|
1396
1403
|
Control.prototype._offsetLeft = function (offset) {
|
|
1397
1404
|
this._isDirty = true;
|
|
1398
1405
|
this._currentMeasure.left += offset;
|
|
1399
1406
|
};
|
|
1400
|
-
/**
|
|
1407
|
+
/**
|
|
1408
|
+
* @param offset
|
|
1409
|
+
* @hidden
|
|
1410
|
+
*/
|
|
1401
1411
|
Control.prototype._offsetTop = function (offset) {
|
|
1402
1412
|
this._isDirty = true;
|
|
1403
1413
|
this._currentMeasure.top += offset;
|
|
@@ -1411,7 +1421,11 @@ var Control = /** @class */ (function () {
|
|
|
1411
1421
|
Control.prototype._flagDescendantsAsMatrixDirty = function () {
|
|
1412
1422
|
// No child
|
|
1413
1423
|
};
|
|
1414
|
-
/**
|
|
1424
|
+
/**
|
|
1425
|
+
* @param rect
|
|
1426
|
+
* @param context
|
|
1427
|
+
* @hidden
|
|
1428
|
+
*/
|
|
1415
1429
|
Control.prototype._intersectsRect = function (rect, context) {
|
|
1416
1430
|
// make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.
|
|
1417
1431
|
this._transform(context);
|
|
@@ -1438,6 +1452,7 @@ var Control = /** @class */ (function () {
|
|
|
1438
1452
|
return 0;
|
|
1439
1453
|
};
|
|
1440
1454
|
/** @hidden */
|
|
1455
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1441
1456
|
Control.prototype.invalidateRect = function () {
|
|
1442
1457
|
this._transform();
|
|
1443
1458
|
if (this.host && this.host.useInvalidateRectOptimization) {
|
|
@@ -1459,7 +1474,10 @@ var Control = /** @class */ (function () {
|
|
|
1459
1474
|
this.host.invalidateRect(Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX), Math.floor(this._tmpMeasureA.top + topShadowOffset - offsetY), Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width + rightShadowOffset + offsetX), Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height + bottomShadowOffset + offsetY));
|
|
1460
1475
|
}
|
|
1461
1476
|
};
|
|
1462
|
-
/**
|
|
1477
|
+
/**
|
|
1478
|
+
* @param force
|
|
1479
|
+
* @hidden
|
|
1480
|
+
*/
|
|
1463
1481
|
Control.prototype._markAsDirty = function (force) {
|
|
1464
1482
|
if (force === void 0) { force = false; }
|
|
1465
1483
|
if (!this._isVisible && !force) {
|
|
@@ -1479,14 +1497,20 @@ var Control = /** @class */ (function () {
|
|
|
1479
1497
|
this._prepareFont();
|
|
1480
1498
|
}
|
|
1481
1499
|
};
|
|
1482
|
-
/**
|
|
1500
|
+
/**
|
|
1501
|
+
* @param host
|
|
1502
|
+
* @hidden
|
|
1503
|
+
*/
|
|
1483
1504
|
Control.prototype._link = function (host) {
|
|
1484
1505
|
this._host = host;
|
|
1485
1506
|
if (this._host) {
|
|
1486
1507
|
this.uniqueId = this._host.getScene().getUniqueId();
|
|
1487
1508
|
}
|
|
1488
1509
|
};
|
|
1489
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* @param context
|
|
1512
|
+
* @hidden
|
|
1513
|
+
*/
|
|
1490
1514
|
Control.prototype._transform = function (context) {
|
|
1491
1515
|
if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {
|
|
1492
1516
|
return;
|
|
@@ -1514,7 +1538,10 @@ var Control = /** @class */ (function () {
|
|
|
1514
1538
|
this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);
|
|
1515
1539
|
}
|
|
1516
1540
|
};
|
|
1517
|
-
/**
|
|
1541
|
+
/**
|
|
1542
|
+
* @param context
|
|
1543
|
+
* @hidden
|
|
1544
|
+
*/
|
|
1518
1545
|
Control.prototype._renderHighlight = function (context) {
|
|
1519
1546
|
if (!this.isHighlighted) {
|
|
1520
1547
|
return;
|
|
@@ -1525,11 +1552,17 @@ var Control = /** @class */ (function () {
|
|
|
1525
1552
|
this._renderHighlightSpecific(context);
|
|
1526
1553
|
context.restore();
|
|
1527
1554
|
};
|
|
1528
|
-
/**
|
|
1555
|
+
/**
|
|
1556
|
+
* @param context
|
|
1557
|
+
* @hidden
|
|
1558
|
+
*/
|
|
1529
1559
|
Control.prototype._renderHighlightSpecific = function (context) {
|
|
1530
1560
|
context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
|
|
1531
1561
|
};
|
|
1532
|
-
/**
|
|
1562
|
+
/**
|
|
1563
|
+
* @param context
|
|
1564
|
+
* @hidden
|
|
1565
|
+
*/
|
|
1533
1566
|
Control.prototype._applyStates = function (context) {
|
|
1534
1567
|
if (this._isFontSizeInPercentage) {
|
|
1535
1568
|
this._fontSet = true;
|
|
@@ -1554,7 +1587,11 @@ var Control = /** @class */ (function () {
|
|
|
1554
1587
|
context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;
|
|
1555
1588
|
}
|
|
1556
1589
|
};
|
|
1557
|
-
/**
|
|
1590
|
+
/**
|
|
1591
|
+
* @param parentMeasure
|
|
1592
|
+
* @param context
|
|
1593
|
+
* @hidden
|
|
1594
|
+
*/
|
|
1558
1595
|
Control.prototype._layout = function (parentMeasure, context) {
|
|
1559
1596
|
if (!this.isDirty && (!this.isVisible || this.notRenderable)) {
|
|
1560
1597
|
return false;
|
|
@@ -1581,7 +1618,11 @@ var Control = /** @class */ (function () {
|
|
|
1581
1618
|
this._isDirty = false;
|
|
1582
1619
|
return true;
|
|
1583
1620
|
};
|
|
1584
|
-
/**
|
|
1621
|
+
/**
|
|
1622
|
+
* @param parentMeasure
|
|
1623
|
+
* @param context
|
|
1624
|
+
* @hidden
|
|
1625
|
+
*/
|
|
1585
1626
|
Control.prototype._processMeasures = function (parentMeasure, context) {
|
|
1586
1627
|
this._tempPaddingMeasure.copyFrom(parentMeasure);
|
|
1587
1628
|
// Apply padding if in correct mode
|
|
@@ -1657,7 +1698,11 @@ var Control = /** @class */ (function () {
|
|
|
1657
1698
|
}
|
|
1658
1699
|
}
|
|
1659
1700
|
};
|
|
1660
|
-
/**
|
|
1701
|
+
/**
|
|
1702
|
+
* @param parentMeasure
|
|
1703
|
+
* @param context
|
|
1704
|
+
* @hidden
|
|
1705
|
+
*/
|
|
1661
1706
|
Control.prototype._computeAlignment = function (parentMeasure, context) {
|
|
1662
1707
|
var width = this._currentMeasure.width;
|
|
1663
1708
|
var height = this._currentMeasure.height;
|
|
@@ -1733,15 +1778,26 @@ var Control = /** @class */ (function () {
|
|
|
1733
1778
|
this._currentMeasure.left += x;
|
|
1734
1779
|
this._currentMeasure.top += y;
|
|
1735
1780
|
};
|
|
1736
|
-
/**
|
|
1781
|
+
/**
|
|
1782
|
+
* @param parentMeasure
|
|
1783
|
+
* @param context
|
|
1784
|
+
* @hidden
|
|
1785
|
+
*/
|
|
1737
1786
|
Control.prototype._preMeasure = function (parentMeasure, context) {
|
|
1738
1787
|
// Do nothing
|
|
1739
1788
|
};
|
|
1740
|
-
/**
|
|
1789
|
+
/**
|
|
1790
|
+
* @param parentMeasure
|
|
1791
|
+
* @param context
|
|
1792
|
+
* @hidden
|
|
1793
|
+
*/
|
|
1741
1794
|
Control.prototype._additionalProcessing = function (parentMeasure, context) {
|
|
1742
1795
|
// Do nothing
|
|
1743
1796
|
};
|
|
1744
|
-
/**
|
|
1797
|
+
/**
|
|
1798
|
+
* @param context
|
|
1799
|
+
* @hidden
|
|
1800
|
+
*/
|
|
1745
1801
|
Control.prototype._clipForChildren = function (context) {
|
|
1746
1802
|
// DO nothing
|
|
1747
1803
|
};
|
|
@@ -1774,7 +1830,11 @@ var Control = /** @class */ (function () {
|
|
|
1774
1830
|
}
|
|
1775
1831
|
context.clip();
|
|
1776
1832
|
};
|
|
1777
|
-
/**
|
|
1833
|
+
/**
|
|
1834
|
+
* @param context
|
|
1835
|
+
* @param invalidatedRectangle
|
|
1836
|
+
* @hidden
|
|
1837
|
+
*/
|
|
1778
1838
|
Control.prototype._render = function (context, invalidatedRectangle) {
|
|
1779
1839
|
if (!this.isVisible || this.notRenderable || this._isClipped) {
|
|
1780
1840
|
this._isDirty = false;
|
|
@@ -1808,7 +1868,11 @@ var Control = /** @class */ (function () {
|
|
|
1808
1868
|
context.restore();
|
|
1809
1869
|
return true;
|
|
1810
1870
|
};
|
|
1811
|
-
/**
|
|
1871
|
+
/**
|
|
1872
|
+
* @param context
|
|
1873
|
+
* @param invalidatedRectangle
|
|
1874
|
+
* @hidden
|
|
1875
|
+
*/
|
|
1812
1876
|
Control.prototype._draw = function (context, invalidatedRectangle) {
|
|
1813
1877
|
// Do nothing
|
|
1814
1878
|
};
|
|
@@ -1841,7 +1905,17 @@ var Control = /** @class */ (function () {
|
|
|
1841
1905
|
}
|
|
1842
1906
|
return true;
|
|
1843
1907
|
};
|
|
1844
|
-
/**
|
|
1908
|
+
/**
|
|
1909
|
+
* @param x
|
|
1910
|
+
* @param y
|
|
1911
|
+
* @param pi
|
|
1912
|
+
* @param type
|
|
1913
|
+
* @param pointerId
|
|
1914
|
+
* @param buttonIndex
|
|
1915
|
+
* @param deltaX
|
|
1916
|
+
* @param deltaY
|
|
1917
|
+
* @hidden
|
|
1918
|
+
*/
|
|
1845
1919
|
Control.prototype._processPicking = function (x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1846
1920
|
if (!this._isEnabled) {
|
|
1847
1921
|
return false;
|
|
@@ -1855,14 +1929,24 @@ var Control = /** @class */ (function () {
|
|
|
1855
1929
|
this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);
|
|
1856
1930
|
return true;
|
|
1857
1931
|
};
|
|
1858
|
-
/**
|
|
1932
|
+
/**
|
|
1933
|
+
* @param target
|
|
1934
|
+
* @param coordinates
|
|
1935
|
+
* @param pointerId
|
|
1936
|
+
* @param pi
|
|
1937
|
+
* @hidden
|
|
1938
|
+
*/
|
|
1859
1939
|
Control.prototype._onPointerMove = function (target, coordinates, pointerId, pi) {
|
|
1860
1940
|
var canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);
|
|
1861
1941
|
if (canNotify && this.parent != null) {
|
|
1862
1942
|
this.parent._onPointerMove(target, coordinates, pointerId, pi);
|
|
1863
1943
|
}
|
|
1864
1944
|
};
|
|
1865
|
-
/**
|
|
1945
|
+
/**
|
|
1946
|
+
* @param target
|
|
1947
|
+
* @param pi
|
|
1948
|
+
* @hidden
|
|
1949
|
+
*/
|
|
1866
1950
|
Control.prototype._onPointerEnter = function (target, pi) {
|
|
1867
1951
|
if (!this._isEnabled) {
|
|
1868
1952
|
return false;
|
|
@@ -1881,7 +1965,12 @@ var Control = /** @class */ (function () {
|
|
|
1881
1965
|
}
|
|
1882
1966
|
return true;
|
|
1883
1967
|
};
|
|
1884
|
-
/**
|
|
1968
|
+
/**
|
|
1969
|
+
* @param target
|
|
1970
|
+
* @param pi
|
|
1971
|
+
* @param force
|
|
1972
|
+
* @hidden
|
|
1973
|
+
*/
|
|
1885
1974
|
Control.prototype._onPointerOut = function (target, pi, force) {
|
|
1886
1975
|
if (force === void 0) { force = false; }
|
|
1887
1976
|
if (!force && (!this._isEnabled || target === this)) {
|
|
@@ -1896,7 +1985,14 @@ var Control = /** @class */ (function () {
|
|
|
1896
1985
|
this.parent._onPointerOut(target, pi, force);
|
|
1897
1986
|
}
|
|
1898
1987
|
};
|
|
1899
|
-
/**
|
|
1988
|
+
/**
|
|
1989
|
+
* @param target
|
|
1990
|
+
* @param coordinates
|
|
1991
|
+
* @param pointerId
|
|
1992
|
+
* @param buttonIndex
|
|
1993
|
+
* @param pi
|
|
1994
|
+
* @hidden
|
|
1995
|
+
*/
|
|
1900
1996
|
Control.prototype._onPointerDown = function (target, coordinates, pointerId, buttonIndex, pi) {
|
|
1901
1997
|
// Prevent pointerout to lose control context.
|
|
1902
1998
|
// Event redundancy is checked inside the function.
|
|
@@ -1912,7 +2008,15 @@ var Control = /** @class */ (function () {
|
|
|
1912
2008
|
}
|
|
1913
2009
|
return true;
|
|
1914
2010
|
};
|
|
1915
|
-
/**
|
|
2011
|
+
/**
|
|
2012
|
+
* @param target
|
|
2013
|
+
* @param coordinates
|
|
2014
|
+
* @param pointerId
|
|
2015
|
+
* @param buttonIndex
|
|
2016
|
+
* @param notifyClick
|
|
2017
|
+
* @param pi
|
|
2018
|
+
* @hidden
|
|
2019
|
+
*/
|
|
1916
2020
|
Control.prototype._onPointerUp = function (target, coordinates, pointerId, buttonIndex, notifyClick, pi) {
|
|
1917
2021
|
if (!this._isEnabled) {
|
|
1918
2022
|
return;
|
|
@@ -1928,7 +2032,10 @@ var Control = /** @class */ (function () {
|
|
|
1928
2032
|
this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);
|
|
1929
2033
|
}
|
|
1930
2034
|
};
|
|
1931
|
-
/**
|
|
2035
|
+
/**
|
|
2036
|
+
* @param pointerId
|
|
2037
|
+
* @hidden
|
|
2038
|
+
*/
|
|
1932
2039
|
Control.prototype._forcePointerUp = function (pointerId) {
|
|
1933
2040
|
if (pointerId === void 0) { pointerId = null; }
|
|
1934
2041
|
if (pointerId !== null) {
|
|
@@ -1940,7 +2047,11 @@ var Control = /** @class */ (function () {
|
|
|
1940
2047
|
}
|
|
1941
2048
|
}
|
|
1942
2049
|
};
|
|
1943
|
-
/**
|
|
2050
|
+
/**
|
|
2051
|
+
* @param deltaX
|
|
2052
|
+
* @param deltaY
|
|
2053
|
+
* @hidden
|
|
2054
|
+
*/
|
|
1944
2055
|
Control.prototype._onWheelScroll = function (deltaX, deltaY) {
|
|
1945
2056
|
if (!this._isEnabled) {
|
|
1946
2057
|
return;
|
|
@@ -1952,7 +2063,17 @@ var Control = /** @class */ (function () {
|
|
|
1952
2063
|
};
|
|
1953
2064
|
/** @hidden */
|
|
1954
2065
|
Control.prototype._onCanvasBlur = function () { };
|
|
1955
|
-
/**
|
|
2066
|
+
/**
|
|
2067
|
+
* @param type
|
|
2068
|
+
* @param x
|
|
2069
|
+
* @param y
|
|
2070
|
+
* @param pi
|
|
2071
|
+
* @param pointerId
|
|
2072
|
+
* @param buttonIndex
|
|
2073
|
+
* @param deltaX
|
|
2074
|
+
* @param deltaY
|
|
2075
|
+
* @hidden
|
|
2076
|
+
*/
|
|
1956
2077
|
Control.prototype._processObservables = function (type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1957
2078
|
if (!this._isEnabled) {
|
|
1958
2079
|
return false;
|
|
@@ -2020,7 +2141,11 @@ var Control = /** @class */ (function () {
|
|
|
2020
2141
|
serializationObject.fontStyle = this.fontStyle;
|
|
2021
2142
|
}
|
|
2022
2143
|
};
|
|
2023
|
-
/**
|
|
2144
|
+
/**
|
|
2145
|
+
* @param serializedObject
|
|
2146
|
+
* @param host
|
|
2147
|
+
* @hidden
|
|
2148
|
+
*/
|
|
2024
2149
|
Control.prototype._parseFromContent = function (serializedObject, host) {
|
|
2025
2150
|
if (serializedObject.fontFamily) {
|
|
2026
2151
|
this.fontFamily = serializedObject.fontFamily;
|
|
@@ -2113,7 +2238,10 @@ var Control = /** @class */ (function () {
|
|
|
2113
2238
|
enumerable: false,
|
|
2114
2239
|
configurable: true
|
|
2115
2240
|
});
|
|
2116
|
-
/**
|
|
2241
|
+
/**
|
|
2242
|
+
* @param font
|
|
2243
|
+
* @hidden
|
|
2244
|
+
*/
|
|
2117
2245
|
Control._GetFontOffset = function (font) {
|
|
2118
2246
|
if (Control._FontHeightSizes[font]) {
|
|
2119
2247
|
return Control._FontHeightSizes[font];
|
|
@@ -2139,7 +2267,14 @@ var Control = /** @class */ (function () {
|
|
|
2139
2267
|
control._parseFromContent(serializedObject, host);
|
|
2140
2268
|
return control;
|
|
2141
2269
|
};
|
|
2142
|
-
/**
|
|
2270
|
+
/**
|
|
2271
|
+
* @param x
|
|
2272
|
+
* @param y
|
|
2273
|
+
* @param width
|
|
2274
|
+
* @param height
|
|
2275
|
+
* @param context
|
|
2276
|
+
* @hidden
|
|
2277
|
+
*/
|
|
2143
2278
|
Control.drawEllipse = function (x, y, width, height, context) {
|
|
2144
2279
|
context.translate(x, y);
|
|
2145
2280
|
context.scale(width, height);
|
|
@@ -2162,16 +2297,6 @@ var Control = /** @class */ (function () {
|
|
|
2162
2297
|
Control._VERTICAL_ALIGNMENT_BOTTOM = 1;
|
|
2163
2298
|
Control._VERTICAL_ALIGNMENT_CENTER = 2;
|
|
2164
2299
|
Control._FontHeightSizes = {};
|
|
2165
|
-
/**
|
|
2166
|
-
* Creates a stack panel that can be used to render headers
|
|
2167
|
-
* @param control defines the control to associate with the header
|
|
2168
|
-
* @param text defines the text of the header
|
|
2169
|
-
* @param size defines the size of the header
|
|
2170
|
-
* @param options defines options used to configure the header
|
|
2171
|
-
* @returns a new StackPanel
|
|
2172
|
-
* @ignore
|
|
2173
|
-
* @hidden
|
|
2174
|
-
*/
|
|
2175
2300
|
Control.AddHeader = function () { };
|
|
2176
2301
|
__decorate([
|
|
2177
2302
|
serialize()
|