@babylonjs/gui 5.0.0-rc.4 → 5.0.0-rc.7
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 +171 -48
- package/2D/controls/control.js +165 -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
|
@@ -1333,7 +1333,7 @@ var Control = /** @class */ (function () {
|
|
|
1333
1333
|
this._host._linkedControls.push(this);
|
|
1334
1334
|
};
|
|
1335
1335
|
/**
|
|
1336
|
-
* Shorthand
|
|
1336
|
+
* Shorthand function to set the top, right, bottom, and left padding values on the control.
|
|
1337
1337
|
* @param { string | number} paddingTop - The value of the top padding.
|
|
1338
1338
|
* @param { string | number} paddingRight - The value of the right padding. If omitted, top is used.
|
|
1339
1339
|
* @param { string | number} paddingBottom - The value of the bottom padding. If omitted, top is used.
|
|
@@ -1368,7 +1368,10 @@ var Control = /** @class */ (function () {
|
|
|
1368
1368
|
this.paddingBottomInPixels = bottom;
|
|
1369
1369
|
this.paddingLeftInPixels = left;
|
|
1370
1370
|
};
|
|
1371
|
-
/**
|
|
1371
|
+
/**
|
|
1372
|
+
* @param projectedPosition
|
|
1373
|
+
* @hidden
|
|
1374
|
+
*/
|
|
1372
1375
|
Control.prototype._moveToProjectedPosition = function (projectedPosition) {
|
|
1373
1376
|
var _a;
|
|
1374
1377
|
var oldLeft = this._left.getValue(this._host);
|
|
@@ -1393,12 +1396,18 @@ var Control = /** @class */ (function () {
|
|
|
1393
1396
|
this._top.ignoreAdaptiveScaling = true;
|
|
1394
1397
|
this._markAsDirty();
|
|
1395
1398
|
};
|
|
1396
|
-
/**
|
|
1399
|
+
/**
|
|
1400
|
+
* @param offset
|
|
1401
|
+
* @hidden
|
|
1402
|
+
*/
|
|
1397
1403
|
Control.prototype._offsetLeft = function (offset) {
|
|
1398
1404
|
this._isDirty = true;
|
|
1399
1405
|
this._currentMeasure.left += offset;
|
|
1400
1406
|
};
|
|
1401
|
-
/**
|
|
1407
|
+
/**
|
|
1408
|
+
* @param offset
|
|
1409
|
+
* @hidden
|
|
1410
|
+
*/
|
|
1402
1411
|
Control.prototype._offsetTop = function (offset) {
|
|
1403
1412
|
this._isDirty = true;
|
|
1404
1413
|
this._currentMeasure.top += offset;
|
|
@@ -1412,7 +1421,11 @@ var Control = /** @class */ (function () {
|
|
|
1412
1421
|
Control.prototype._flagDescendantsAsMatrixDirty = function () {
|
|
1413
1422
|
// No child
|
|
1414
1423
|
};
|
|
1415
|
-
/**
|
|
1424
|
+
/**
|
|
1425
|
+
* @param rect
|
|
1426
|
+
* @param context
|
|
1427
|
+
* @hidden
|
|
1428
|
+
*/
|
|
1416
1429
|
Control.prototype._intersectsRect = function (rect, context) {
|
|
1417
1430
|
// make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.
|
|
1418
1431
|
this._transform(context);
|
|
@@ -1439,6 +1452,7 @@ var Control = /** @class */ (function () {
|
|
|
1439
1452
|
return 0;
|
|
1440
1453
|
};
|
|
1441
1454
|
/** @hidden */
|
|
1455
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1442
1456
|
Control.prototype.invalidateRect = function () {
|
|
1443
1457
|
this._transform();
|
|
1444
1458
|
if (this.host && this.host.useInvalidateRectOptimization) {
|
|
@@ -1460,7 +1474,10 @@ var Control = /** @class */ (function () {
|
|
|
1460
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));
|
|
1461
1475
|
}
|
|
1462
1476
|
};
|
|
1463
|
-
/**
|
|
1477
|
+
/**
|
|
1478
|
+
* @param force
|
|
1479
|
+
* @hidden
|
|
1480
|
+
*/
|
|
1464
1481
|
Control.prototype._markAsDirty = function (force) {
|
|
1465
1482
|
if (force === void 0) { force = false; }
|
|
1466
1483
|
if (!this._isVisible && !force) {
|
|
@@ -1480,14 +1497,20 @@ var Control = /** @class */ (function () {
|
|
|
1480
1497
|
this._prepareFont();
|
|
1481
1498
|
}
|
|
1482
1499
|
};
|
|
1483
|
-
/**
|
|
1500
|
+
/**
|
|
1501
|
+
* @param host
|
|
1502
|
+
* @hidden
|
|
1503
|
+
*/
|
|
1484
1504
|
Control.prototype._link = function (host) {
|
|
1485
1505
|
this._host = host;
|
|
1486
1506
|
if (this._host) {
|
|
1487
1507
|
this.uniqueId = this._host.getScene().getUniqueId();
|
|
1488
1508
|
}
|
|
1489
1509
|
};
|
|
1490
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* @param context
|
|
1512
|
+
* @hidden
|
|
1513
|
+
*/
|
|
1491
1514
|
Control.prototype._transform = function (context) {
|
|
1492
1515
|
if (!this._isMatrixDirty && this._scaleX === 1 && this._scaleY === 1 && this._rotation === 0) {
|
|
1493
1516
|
return;
|
|
@@ -1515,7 +1538,10 @@ var Control = /** @class */ (function () {
|
|
|
1515
1538
|
this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);
|
|
1516
1539
|
}
|
|
1517
1540
|
};
|
|
1518
|
-
/**
|
|
1541
|
+
/**
|
|
1542
|
+
* @param context
|
|
1543
|
+
* @hidden
|
|
1544
|
+
*/
|
|
1519
1545
|
Control.prototype._renderHighlight = function (context) {
|
|
1520
1546
|
if (!this.isHighlighted) {
|
|
1521
1547
|
return;
|
|
@@ -1526,11 +1552,17 @@ var Control = /** @class */ (function () {
|
|
|
1526
1552
|
this._renderHighlightSpecific(context);
|
|
1527
1553
|
context.restore();
|
|
1528
1554
|
};
|
|
1529
|
-
/**
|
|
1555
|
+
/**
|
|
1556
|
+
* @param context
|
|
1557
|
+
* @hidden
|
|
1558
|
+
*/
|
|
1530
1559
|
Control.prototype._renderHighlightSpecific = function (context) {
|
|
1531
1560
|
context.strokeRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
|
|
1532
1561
|
};
|
|
1533
|
-
/**
|
|
1562
|
+
/**
|
|
1563
|
+
* @param context
|
|
1564
|
+
* @hidden
|
|
1565
|
+
*/
|
|
1534
1566
|
Control.prototype._applyStates = function (context) {
|
|
1535
1567
|
if (this._isFontSizeInPercentage) {
|
|
1536
1568
|
this._fontSet = true;
|
|
@@ -1555,7 +1587,11 @@ var Control = /** @class */ (function () {
|
|
|
1555
1587
|
context.globalAlpha = this.parent && !this.parent.renderToIntermediateTexture ? this.parent.alpha * this._alpha : this._alpha;
|
|
1556
1588
|
}
|
|
1557
1589
|
};
|
|
1558
|
-
/**
|
|
1590
|
+
/**
|
|
1591
|
+
* @param parentMeasure
|
|
1592
|
+
* @param context
|
|
1593
|
+
* @hidden
|
|
1594
|
+
*/
|
|
1559
1595
|
Control.prototype._layout = function (parentMeasure, context) {
|
|
1560
1596
|
if (!this.isDirty && (!this.isVisible || this.notRenderable)) {
|
|
1561
1597
|
return false;
|
|
@@ -1582,7 +1618,11 @@ var Control = /** @class */ (function () {
|
|
|
1582
1618
|
this._isDirty = false;
|
|
1583
1619
|
return true;
|
|
1584
1620
|
};
|
|
1585
|
-
/**
|
|
1621
|
+
/**
|
|
1622
|
+
* @param parentMeasure
|
|
1623
|
+
* @param context
|
|
1624
|
+
* @hidden
|
|
1625
|
+
*/
|
|
1586
1626
|
Control.prototype._processMeasures = function (parentMeasure, context) {
|
|
1587
1627
|
this._tempPaddingMeasure.copyFrom(parentMeasure);
|
|
1588
1628
|
// Apply padding if in correct mode
|
|
@@ -1658,7 +1698,11 @@ var Control = /** @class */ (function () {
|
|
|
1658
1698
|
}
|
|
1659
1699
|
}
|
|
1660
1700
|
};
|
|
1661
|
-
/**
|
|
1701
|
+
/**
|
|
1702
|
+
* @param parentMeasure
|
|
1703
|
+
* @param context
|
|
1704
|
+
* @hidden
|
|
1705
|
+
*/
|
|
1662
1706
|
Control.prototype._computeAlignment = function (parentMeasure, context) {
|
|
1663
1707
|
var width = this._currentMeasure.width;
|
|
1664
1708
|
var height = this._currentMeasure.height;
|
|
@@ -1734,15 +1778,26 @@ var Control = /** @class */ (function () {
|
|
|
1734
1778
|
this._currentMeasure.left += x;
|
|
1735
1779
|
this._currentMeasure.top += y;
|
|
1736
1780
|
};
|
|
1737
|
-
/**
|
|
1781
|
+
/**
|
|
1782
|
+
* @param parentMeasure
|
|
1783
|
+
* @param context
|
|
1784
|
+
* @hidden
|
|
1785
|
+
*/
|
|
1738
1786
|
Control.prototype._preMeasure = function (parentMeasure, context) {
|
|
1739
1787
|
// Do nothing
|
|
1740
1788
|
};
|
|
1741
|
-
/**
|
|
1789
|
+
/**
|
|
1790
|
+
* @param parentMeasure
|
|
1791
|
+
* @param context
|
|
1792
|
+
* @hidden
|
|
1793
|
+
*/
|
|
1742
1794
|
Control.prototype._additionalProcessing = function (parentMeasure, context) {
|
|
1743
1795
|
// Do nothing
|
|
1744
1796
|
};
|
|
1745
|
-
/**
|
|
1797
|
+
/**
|
|
1798
|
+
* @param context
|
|
1799
|
+
* @hidden
|
|
1800
|
+
*/
|
|
1746
1801
|
Control.prototype._clipForChildren = function (context) {
|
|
1747
1802
|
// DO nothing
|
|
1748
1803
|
};
|
|
@@ -1775,7 +1830,11 @@ var Control = /** @class */ (function () {
|
|
|
1775
1830
|
}
|
|
1776
1831
|
context.clip();
|
|
1777
1832
|
};
|
|
1778
|
-
/**
|
|
1833
|
+
/**
|
|
1834
|
+
* @param context
|
|
1835
|
+
* @param invalidatedRectangle
|
|
1836
|
+
* @hidden
|
|
1837
|
+
*/
|
|
1779
1838
|
Control.prototype._render = function (context, invalidatedRectangle) {
|
|
1780
1839
|
if (!this.isVisible || this.notRenderable || this._isClipped) {
|
|
1781
1840
|
this._isDirty = false;
|
|
@@ -1809,7 +1868,11 @@ var Control = /** @class */ (function () {
|
|
|
1809
1868
|
context.restore();
|
|
1810
1869
|
return true;
|
|
1811
1870
|
};
|
|
1812
|
-
/**
|
|
1871
|
+
/**
|
|
1872
|
+
* @param context
|
|
1873
|
+
* @param invalidatedRectangle
|
|
1874
|
+
* @hidden
|
|
1875
|
+
*/
|
|
1813
1876
|
Control.prototype._draw = function (context, invalidatedRectangle) {
|
|
1814
1877
|
// Do nothing
|
|
1815
1878
|
};
|
|
@@ -1842,7 +1905,17 @@ var Control = /** @class */ (function () {
|
|
|
1842
1905
|
}
|
|
1843
1906
|
return true;
|
|
1844
1907
|
};
|
|
1845
|
-
/**
|
|
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
|
+
*/
|
|
1846
1919
|
Control.prototype._processPicking = function (x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1847
1920
|
if (!this._isEnabled) {
|
|
1848
1921
|
return false;
|
|
@@ -1856,14 +1929,24 @@ var Control = /** @class */ (function () {
|
|
|
1856
1929
|
this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);
|
|
1857
1930
|
return true;
|
|
1858
1931
|
};
|
|
1859
|
-
/**
|
|
1932
|
+
/**
|
|
1933
|
+
* @param target
|
|
1934
|
+
* @param coordinates
|
|
1935
|
+
* @param pointerId
|
|
1936
|
+
* @param pi
|
|
1937
|
+
* @hidden
|
|
1938
|
+
*/
|
|
1860
1939
|
Control.prototype._onPointerMove = function (target, coordinates, pointerId, pi) {
|
|
1861
1940
|
var canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);
|
|
1862
1941
|
if (canNotify && this.parent != null) {
|
|
1863
1942
|
this.parent._onPointerMove(target, coordinates, pointerId, pi);
|
|
1864
1943
|
}
|
|
1865
1944
|
};
|
|
1866
|
-
/**
|
|
1945
|
+
/**
|
|
1946
|
+
* @param target
|
|
1947
|
+
* @param pi
|
|
1948
|
+
* @hidden
|
|
1949
|
+
*/
|
|
1867
1950
|
Control.prototype._onPointerEnter = function (target, pi) {
|
|
1868
1951
|
if (!this._isEnabled) {
|
|
1869
1952
|
return false;
|
|
@@ -1882,7 +1965,12 @@ var Control = /** @class */ (function () {
|
|
|
1882
1965
|
}
|
|
1883
1966
|
return true;
|
|
1884
1967
|
};
|
|
1885
|
-
/**
|
|
1968
|
+
/**
|
|
1969
|
+
* @param target
|
|
1970
|
+
* @param pi
|
|
1971
|
+
* @param force
|
|
1972
|
+
* @hidden
|
|
1973
|
+
*/
|
|
1886
1974
|
Control.prototype._onPointerOut = function (target, pi, force) {
|
|
1887
1975
|
if (force === void 0) { force = false; }
|
|
1888
1976
|
if (!force && (!this._isEnabled || target === this)) {
|
|
@@ -1897,7 +1985,14 @@ var Control = /** @class */ (function () {
|
|
|
1897
1985
|
this.parent._onPointerOut(target, pi, force);
|
|
1898
1986
|
}
|
|
1899
1987
|
};
|
|
1900
|
-
/**
|
|
1988
|
+
/**
|
|
1989
|
+
* @param target
|
|
1990
|
+
* @param coordinates
|
|
1991
|
+
* @param pointerId
|
|
1992
|
+
* @param buttonIndex
|
|
1993
|
+
* @param pi
|
|
1994
|
+
* @hidden
|
|
1995
|
+
*/
|
|
1901
1996
|
Control.prototype._onPointerDown = function (target, coordinates, pointerId, buttonIndex, pi) {
|
|
1902
1997
|
// Prevent pointerout to lose control context.
|
|
1903
1998
|
// Event redundancy is checked inside the function.
|
|
@@ -1913,7 +2008,15 @@ var Control = /** @class */ (function () {
|
|
|
1913
2008
|
}
|
|
1914
2009
|
return true;
|
|
1915
2010
|
};
|
|
1916
|
-
/**
|
|
2011
|
+
/**
|
|
2012
|
+
* @param target
|
|
2013
|
+
* @param coordinates
|
|
2014
|
+
* @param pointerId
|
|
2015
|
+
* @param buttonIndex
|
|
2016
|
+
* @param notifyClick
|
|
2017
|
+
* @param pi
|
|
2018
|
+
* @hidden
|
|
2019
|
+
*/
|
|
1917
2020
|
Control.prototype._onPointerUp = function (target, coordinates, pointerId, buttonIndex, notifyClick, pi) {
|
|
1918
2021
|
if (!this._isEnabled) {
|
|
1919
2022
|
return;
|
|
@@ -1929,7 +2032,10 @@ var Control = /** @class */ (function () {
|
|
|
1929
2032
|
this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);
|
|
1930
2033
|
}
|
|
1931
2034
|
};
|
|
1932
|
-
/**
|
|
2035
|
+
/**
|
|
2036
|
+
* @param pointerId
|
|
2037
|
+
* @hidden
|
|
2038
|
+
*/
|
|
1933
2039
|
Control.prototype._forcePointerUp = function (pointerId) {
|
|
1934
2040
|
if (pointerId === void 0) { pointerId = null; }
|
|
1935
2041
|
if (pointerId !== null) {
|
|
@@ -1941,7 +2047,11 @@ var Control = /** @class */ (function () {
|
|
|
1941
2047
|
}
|
|
1942
2048
|
}
|
|
1943
2049
|
};
|
|
1944
|
-
/**
|
|
2050
|
+
/**
|
|
2051
|
+
* @param deltaX
|
|
2052
|
+
* @param deltaY
|
|
2053
|
+
* @hidden
|
|
2054
|
+
*/
|
|
1945
2055
|
Control.prototype._onWheelScroll = function (deltaX, deltaY) {
|
|
1946
2056
|
if (!this._isEnabled) {
|
|
1947
2057
|
return;
|
|
@@ -1953,7 +2063,17 @@ var Control = /** @class */ (function () {
|
|
|
1953
2063
|
};
|
|
1954
2064
|
/** @hidden */
|
|
1955
2065
|
Control.prototype._onCanvasBlur = function () { };
|
|
1956
|
-
/**
|
|
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
|
+
*/
|
|
1957
2077
|
Control.prototype._processObservables = function (type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY) {
|
|
1958
2078
|
if (!this._isEnabled) {
|
|
1959
2079
|
return false;
|
|
@@ -2021,7 +2141,11 @@ var Control = /** @class */ (function () {
|
|
|
2021
2141
|
serializationObject.fontStyle = this.fontStyle;
|
|
2022
2142
|
}
|
|
2023
2143
|
};
|
|
2024
|
-
/**
|
|
2144
|
+
/**
|
|
2145
|
+
* @param serializedObject
|
|
2146
|
+
* @param host
|
|
2147
|
+
* @hidden
|
|
2148
|
+
*/
|
|
2025
2149
|
Control.prototype._parseFromContent = function (serializedObject, host) {
|
|
2026
2150
|
if (serializedObject.fontFamily) {
|
|
2027
2151
|
this.fontFamily = serializedObject.fontFamily;
|
|
@@ -2114,7 +2238,10 @@ var Control = /** @class */ (function () {
|
|
|
2114
2238
|
enumerable: false,
|
|
2115
2239
|
configurable: true
|
|
2116
2240
|
});
|
|
2117
|
-
/**
|
|
2241
|
+
/**
|
|
2242
|
+
* @param font
|
|
2243
|
+
* @hidden
|
|
2244
|
+
*/
|
|
2118
2245
|
Control._GetFontOffset = function (font) {
|
|
2119
2246
|
if (Control._FontHeightSizes[font]) {
|
|
2120
2247
|
return Control._FontHeightSizes[font];
|
|
@@ -2140,7 +2267,14 @@ var Control = /** @class */ (function () {
|
|
|
2140
2267
|
control._parseFromContent(serializedObject, host);
|
|
2141
2268
|
return control;
|
|
2142
2269
|
};
|
|
2143
|
-
/**
|
|
2270
|
+
/**
|
|
2271
|
+
* @param x
|
|
2272
|
+
* @param y
|
|
2273
|
+
* @param width
|
|
2274
|
+
* @param height
|
|
2275
|
+
* @param context
|
|
2276
|
+
* @hidden
|
|
2277
|
+
*/
|
|
2144
2278
|
Control.drawEllipse = function (x, y, width, height, context) {
|
|
2145
2279
|
context.translate(x, y);
|
|
2146
2280
|
context.scale(width, height);
|
|
@@ -2163,16 +2297,6 @@ var Control = /** @class */ (function () {
|
|
|
2163
2297
|
Control._VERTICAL_ALIGNMENT_BOTTOM = 1;
|
|
2164
2298
|
Control._VERTICAL_ALIGNMENT_CENTER = 2;
|
|
2165
2299
|
Control._FontHeightSizes = {};
|
|
2166
|
-
/**
|
|
2167
|
-
* Creates a stack panel that can be used to render headers
|
|
2168
|
-
* @param control defines the control to associate with the header
|
|
2169
|
-
* @param text defines the text of the header
|
|
2170
|
-
* @param size defines the size of the header
|
|
2171
|
-
* @param options defines options used to configure the header
|
|
2172
|
-
* @returns a new StackPanel
|
|
2173
|
-
* @ignore
|
|
2174
|
-
* @hidden
|
|
2175
|
-
*/
|
|
2176
2300
|
Control.AddHeader = function () { };
|
|
2177
2301
|
__decorate([
|
|
2178
2302
|
serialize()
|