babylonjs-gui 5.54.0 → 5.56.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/babylon.gui.d.ts +21 -5
- package/babylon.gui.js +77 -15
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +42 -10
- package/package.json +2 -2
package/babylon.gui.d.ts
CHANGED
@@ -1082,16 +1082,20 @@ declare module BABYLON.GUI {
|
|
1082
1082
|
isPointerBlocker: boolean;
|
1083
1083
|
/** Gets or sets a boolean indicating if the control can be focusable */
|
1084
1084
|
isFocusInvisible: boolean;
|
1085
|
+
protected _clipChildren: boolean;
|
1085
1086
|
/**
|
1086
|
-
* Gets
|
1087
|
+
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
|
1087
1088
|
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
1088
1089
|
*/
|
1089
|
-
clipChildren: boolean;
|
1090
|
+
set clipChildren(value: boolean);
|
1091
|
+
get clipChildren(): boolean;
|
1092
|
+
protected _clipContent: boolean;
|
1090
1093
|
/**
|
1091
|
-
* Gets
|
1092
|
-
* Please note that not clipping
|
1094
|
+
* Sets/Gets a boolean indicating that control content must be clipped
|
1095
|
+
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
1093
1096
|
*/
|
1094
|
-
clipContent: boolean;
|
1097
|
+
set clipContent(value: boolean);
|
1098
|
+
get clipContent(): boolean;
|
1095
1099
|
/**
|
1096
1100
|
* Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
|
1097
1101
|
*/
|
@@ -2094,6 +2098,18 @@ declare module BABYLON.GUI {
|
|
2094
2098
|
private _columnDefinitionObservers;
|
2095
2099
|
private _cells;
|
2096
2100
|
private _childControls;
|
2101
|
+
/**
|
2102
|
+
* Sets/Gets a boolean indicating that control content must be clipped
|
2103
|
+
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
2104
|
+
*/
|
2105
|
+
set clipContent(value: boolean);
|
2106
|
+
get clipContent(): boolean;
|
2107
|
+
/**
|
2108
|
+
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
|
2109
|
+
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
2110
|
+
*/
|
2111
|
+
set clipChildren(value: boolean);
|
2112
|
+
get clipChildren(): boolean;
|
2097
2113
|
/**
|
2098
2114
|
* Gets the number of columns
|
2099
2115
|
*/
|
package/babylon.gui.js
CHANGED
@@ -4655,16 +4655,8 @@ var Control = /** @class */ (function () {
|
|
4655
4655
|
this.isPointerBlocker = false;
|
4656
4656
|
/** Gets or sets a boolean indicating if the control can be focusable */
|
4657
4657
|
this.isFocusInvisible = false;
|
4658
|
-
|
4659
|
-
|
4660
|
-
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
4661
|
-
*/
|
4662
|
-
this.clipChildren = true;
|
4663
|
-
/**
|
4664
|
-
* Gets or sets a boolean indicating that control content must be clipped
|
4665
|
-
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
4666
|
-
*/
|
4667
|
-
this.clipContent = true;
|
4658
|
+
this._clipChildren = true;
|
4659
|
+
this._clipContent = true;
|
4668
4660
|
/**
|
4669
4661
|
* Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
|
4670
4662
|
*/
|
@@ -4768,6 +4760,34 @@ var Control = /** @class */ (function () {
|
|
4768
4760
|
enumerable: false,
|
4769
4761
|
configurable: true
|
4770
4762
|
});
|
4763
|
+
Object.defineProperty(Control.prototype, "clipChildren", {
|
4764
|
+
get: function () {
|
4765
|
+
return this._clipChildren;
|
4766
|
+
},
|
4767
|
+
/**
|
4768
|
+
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
|
4769
|
+
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
4770
|
+
*/
|
4771
|
+
set: function (value) {
|
4772
|
+
this._clipChildren = value;
|
4773
|
+
},
|
4774
|
+
enumerable: false,
|
4775
|
+
configurable: true
|
4776
|
+
});
|
4777
|
+
Object.defineProperty(Control.prototype, "clipContent", {
|
4778
|
+
get: function () {
|
4779
|
+
return this._clipContent;
|
4780
|
+
},
|
4781
|
+
/**
|
4782
|
+
* Sets/Gets a boolean indicating that control content must be clipped
|
4783
|
+
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
4784
|
+
*/
|
4785
|
+
set: function (value) {
|
4786
|
+
this._clipContent = value;
|
4787
|
+
},
|
4788
|
+
enumerable: false,
|
4789
|
+
configurable: true
|
4790
|
+
});
|
4771
4791
|
Object.defineProperty(Control.prototype, "shadowOffsetX", {
|
4772
4792
|
/** Gets or sets a value indicating the offset to apply on X axis to render the shadow */
|
4773
4793
|
get: function () {
|
@@ -6903,10 +6923,10 @@ var Control = /** @class */ (function () {
|
|
6903
6923
|
], Control.prototype, "isFocusInvisible", void 0);
|
6904
6924
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
6905
6925
|
(0,core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.serialize)()
|
6906
|
-
], Control.prototype, "clipChildren",
|
6926
|
+
], Control.prototype, "clipChildren", null);
|
6907
6927
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
6908
6928
|
(0,core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.serialize)()
|
6909
|
-
], Control.prototype, "clipContent",
|
6929
|
+
], Control.prototype, "clipContent", null);
|
6910
6930
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
6911
6931
|
(0,core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.serialize)()
|
6912
6932
|
], Control.prototype, "useBitmapCache", void 0);
|
@@ -7872,7 +7892,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
7872
7892
|
/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./container */ "../../../lts/gui/dist/2D/controls/container.js");
|
7873
7893
|
/* harmony import */ var _valueAndUnit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../valueAndUnit */ "../../../lts/gui/dist/2D/valueAndUnit.js");
|
7874
7894
|
/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control */ "../../../lts/gui/dist/2D/controls/control.js");
|
7875
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/Misc/
|
7895
|
+
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/Misc/decorators */ "core/Misc/observable");
|
7876
7896
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__);
|
7877
7897
|
|
7878
7898
|
|
@@ -7880,6 +7900,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
7880
7900
|
|
7881
7901
|
|
7882
7902
|
|
7903
|
+
|
7883
7904
|
/**
|
7884
7905
|
* Class used to create a 2D grid container
|
7885
7906
|
*/
|
@@ -7900,6 +7921,42 @@ var Grid = /** @class */ (function (_super) {
|
|
7900
7921
|
_this._childControls = new Array();
|
7901
7922
|
return _this;
|
7902
7923
|
}
|
7924
|
+
Object.defineProperty(Grid.prototype, "clipContent", {
|
7925
|
+
get: function () {
|
7926
|
+
return this._clipContent;
|
7927
|
+
},
|
7928
|
+
/**
|
7929
|
+
* Sets/Gets a boolean indicating that control content must be clipped
|
7930
|
+
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
7931
|
+
*/
|
7932
|
+
set: function (value) {
|
7933
|
+
this._clipContent = value;
|
7934
|
+
// This value has to be replicated on all of the container cells
|
7935
|
+
for (var key in this._cells) {
|
7936
|
+
this._cells[key].clipContent = value;
|
7937
|
+
}
|
7938
|
+
},
|
7939
|
+
enumerable: false,
|
7940
|
+
configurable: true
|
7941
|
+
});
|
7942
|
+
Object.defineProperty(Grid.prototype, "clipChildren", {
|
7943
|
+
get: function () {
|
7944
|
+
return this._clipChildren;
|
7945
|
+
},
|
7946
|
+
/**
|
7947
|
+
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
|
7948
|
+
* Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
7949
|
+
*/
|
7950
|
+
set: function (value) {
|
7951
|
+
this._clipChildren = value;
|
7952
|
+
// This value has to be replicated on all of the container cells
|
7953
|
+
for (var key in this._cells) {
|
7954
|
+
this._cells[key].clipChildren = value;
|
7955
|
+
}
|
7956
|
+
},
|
7957
|
+
enumerable: false,
|
7958
|
+
configurable: true
|
7959
|
+
});
|
7903
7960
|
Object.defineProperty(Grid.prototype, "columnCount", {
|
7904
7961
|
/**
|
7905
7962
|
* Gets the number of columns
|
@@ -8163,6 +8220,8 @@ var Grid = /** @class */ (function (_super) {
|
|
8163
8220
|
this._cells[key] = goodContainer;
|
8164
8221
|
goodContainer.horizontalAlignment = _control__WEBPACK_IMPORTED_MODULE_3__.Control.HORIZONTAL_ALIGNMENT_LEFT;
|
8165
8222
|
goodContainer.verticalAlignment = _control__WEBPACK_IMPORTED_MODULE_3__.Control.VERTICAL_ALIGNMENT_TOP;
|
8223
|
+
goodContainer.clipContent = this.clipContent;
|
8224
|
+
goodContainer.clipChildren = this.clipChildren;
|
8166
8225
|
_super.prototype.addControl.call(this, goodContainer);
|
8167
8226
|
}
|
8168
8227
|
goodContainer.addControl(control);
|
@@ -8397,6 +8456,9 @@ var Grid = /** @class */ (function (_super) {
|
|
8397
8456
|
this.addControl(children[i], rowNumber, columnNumber);
|
8398
8457
|
}
|
8399
8458
|
};
|
8459
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
8460
|
+
(0,core_Misc_tools__WEBPACK_IMPORTED_MODULE_4__.serialize)()
|
8461
|
+
], Grid.prototype, "clipContent", null);
|
8400
8462
|
return Grid;
|
8401
8463
|
}(_container__WEBPACK_IMPORTED_MODULE_1__.Container));
|
8402
8464
|
|
@@ -18434,10 +18496,10 @@ var ValueAndUnit = /** @class */ (function () {
|
|
18434
18496
|
var width = 0;
|
18435
18497
|
var height = 0;
|
18436
18498
|
if (host.idealWidth) {
|
18437
|
-
width = (this._value * host.getSize().width) / host.idealWidth;
|
18499
|
+
width = Math.ceil((this._value * host.getSize().width) / host.idealWidth);
|
18438
18500
|
}
|
18439
18501
|
if (host.idealHeight) {
|
18440
|
-
height = (this._value * host.getSize().height) / host.idealHeight;
|
18502
|
+
height = Math.ceil((this._value * host.getSize().height) / host.idealHeight);
|
18441
18503
|
}
|
18442
18504
|
if (host.useSmallestIdeal && host.idealWidth && host.idealHeight) {
|
18443
18505
|
return window.innerWidth < window.innerHeight ? width : height;
|