babylonjs-gui 5.50.0 → 5.51.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 +2 -0
- package/babylon.gui.js +16 -4
- 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 +4 -0
- package/package.json +2 -2
package/babylon.gui.d.ts
CHANGED
@@ -916,6 +916,8 @@ declare module BABYLON.GUI {
|
|
916
916
|
*/
|
917
917
|
_layout(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): boolean;
|
918
918
|
protected _postMeasure(): void;
|
919
|
+
private _inverseTransformMatrix;
|
920
|
+
private _inverseMeasure;
|
919
921
|
/**
|
920
922
|
* @internal
|
921
923
|
*/
|
package/babylon.gui.js
CHANGED
@@ -3899,6 +3899,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
3899
3899
|
/* harmony import */ var core_Misc_logger__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_logger__WEBPACK_IMPORTED_MODULE_1__);
|
3900
3900
|
/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./control */ "../../../lts/gui/dist/2D/controls/control.js");
|
3901
3901
|
/* harmony import */ var _measure__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../measure */ "../../../lts/gui/dist/2D/measure.js");
|
3902
|
+
/* harmony import */ var _math2D__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math2D */ "../../../lts/gui/dist/2D/math2D.js");
|
3903
|
+
|
3902
3904
|
|
3903
3905
|
|
3904
3906
|
|
@@ -3955,6 +3957,8 @@ var Container = /** @class */ (function (_super) {
|
|
3955
3957
|
* An event triggered when any control is removed from this container.
|
3956
3958
|
*/
|
3957
3959
|
_this.onControlRemovedObservable = new core_Misc_logger__WEBPACK_IMPORTED_MODULE_1__.Observable();
|
3960
|
+
_this._inverseTransformMatrix = _math2D__WEBPACK_IMPORTED_MODULE_4__.Matrix2D.Identity();
|
3961
|
+
_this._inverseMeasure = new _measure__WEBPACK_IMPORTED_MODULE_3__.Measure(0, 0, 0, 0);
|
3958
3962
|
return _this;
|
3959
3963
|
}
|
3960
3964
|
Object.defineProperty(Container.prototype, "renderToIntermediateTexture", {
|
@@ -4345,7 +4349,9 @@ var Container = /** @class */ (function (_super) {
|
|
4345
4349
|
contextToDrawTo.save();
|
4346
4350
|
contextToDrawTo.translate(-this._currentMeasure.left, -this._currentMeasure.top);
|
4347
4351
|
if (invalidatedRectangle) {
|
4348
|
-
|
4352
|
+
this._transformMatrix.invertToRef(this._inverseTransformMatrix);
|
4353
|
+
invalidatedRectangle.transformToRef(this._inverseTransformMatrix, this._inverseMeasure);
|
4354
|
+
contextToDrawTo.clearRect(this._inverseMeasure.left, this._inverseMeasure.top, this._inverseMeasure.width, this._inverseMeasure.height);
|
4349
4355
|
}
|
4350
4356
|
else {
|
4351
4357
|
contextToDrawTo.clearRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
|
@@ -15839,6 +15845,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
15839
15845
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_1__);
|
15840
15846
|
/* harmony import */ var _container__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./container */ "../../../lts/gui/dist/2D/controls/container.js");
|
15841
15847
|
/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./control */ "../../../lts/gui/dist/2D/controls/control.js");
|
15848
|
+
/* harmony import */ var _textBlock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textBlock */ "../../../lts/gui/dist/2D/controls/textBlock.js");
|
15849
|
+
|
15842
15850
|
|
15843
15851
|
|
15844
15852
|
|
@@ -16004,7 +16012,11 @@ var StackPanel = /** @class */ (function (_super) {
|
|
16004
16012
|
this._rebuildLayout = true;
|
16005
16013
|
child._left.ignoreAdaptiveScaling = true;
|
16006
16014
|
}
|
16007
|
-
if (child._width.isPercentage &&
|
16015
|
+
if (child._width.isPercentage &&
|
16016
|
+
!child._automaticSize &&
|
16017
|
+
child.getClassName() === "TextBlock" &&
|
16018
|
+
child.textWrapping !== _textBlock__WEBPACK_IMPORTED_MODULE_4__.TextWrapping.Clip &&
|
16019
|
+
!child.forceResizeWidth) {
|
16008
16020
|
if (!this.ignoreLayoutWarnings) {
|
16009
16021
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_1__.Tools.Warn("Control (Name:".concat(child.name, ", UniqueId:").concat(child.uniqueId, ") is using width in percentage mode inside a horizontal StackPanel"));
|
16010
16022
|
}
|
@@ -16510,7 +16522,7 @@ var TextBlock = /** @class */ (function (_super) {
|
|
16510
16522
|
}
|
16511
16523
|
if (this._resizeToFit) {
|
16512
16524
|
if (this._textWrapping === TextWrapping.Clip || this._forceResizeWidth) {
|
16513
|
-
var newWidth = Math.ceil(this._paddingLeftInPixels + this._paddingRightInPixels + maxLineWidth);
|
16525
|
+
var newWidth = Math.ceil(this._paddingLeftInPixels) + Math.ceil(this._paddingRightInPixels) + Math.ceil(maxLineWidth);
|
16514
16526
|
if (newWidth !== this._width.getValueInPixel(this._host, this._tempParentMeasure.width)) {
|
16515
16527
|
this._width.updateInPlace(newWidth, _valueAndUnit__WEBPACK_IMPORTED_MODULE_2__.ValueAndUnit.UNITMODE_PIXEL);
|
16516
16528
|
this._rebuildLayout = true;
|
@@ -24900,7 +24912,7 @@ var GUI3DManager = /** @class */ (function () {
|
|
24900
24912
|
this._lastControlDown[pointerEvent.pointerId].forcePointerUp();
|
24901
24913
|
delete this._lastControlDown[pointerEvent.pointerId];
|
24902
24914
|
}
|
24903
|
-
if (pointerEvent.pointerType === "touch") {
|
24915
|
+
if (pointerEvent.pointerType === "touch" || (pointerEvent.pointerType === "xr" && this._scene.getEngine().hostInformation.isMobile)) {
|
24904
24916
|
this._handlePointerOut(pointerId, false);
|
24905
24917
|
}
|
24906
24918
|
}
|