babylonjs-gui 5.0.3 → 5.0.4

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 CHANGED
@@ -3911,6 +3911,12 @@ declare module BABYLON.GUI {
3911
3911
  * @returns a new VirtualKeyboard
3912
3912
  */
3913
3913
  static CreateDefaultLayout(name?: string): VirtualKeyboard;
3914
+ /**
3915
+ * @param serializedObject
3916
+ * @param host
3917
+ * @hidden
3918
+ */
3919
+ _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture): void;
3914
3920
  }
3915
3921
 
3916
3922
 
package/babylon.gui.js CHANGED
@@ -4105,6 +4105,7 @@ var Container = /** @class */ (function (_super) {
4105
4105
  if (this.width !== computedWidth + "px") {
4106
4106
  (_a = this.parent) === null || _a === void 0 ? void 0 : _a._markAsDirty();
4107
4107
  this.width = computedWidth + "px";
4108
+ this._width.ignoreAdaptiveScaling = true;
4108
4109
  this._rebuildLayout = true;
4109
4110
  }
4110
4111
  }
@@ -4113,6 +4114,7 @@ var Container = /** @class */ (function (_super) {
4113
4114
  if (this.height !== computedHeight + "px") {
4114
4115
  (_b = this.parent) === null || _b === void 0 ? void 0 : _b._markAsDirty();
4115
4116
  this.height = computedHeight + "px";
4117
+ this._height.ignoreAdaptiveScaling = true;
4116
4118
  this._rebuildLayout = true;
4117
4119
  }
4118
4120
  }
@@ -15601,6 +15603,32 @@ var VirtualKeyboard = /** @class */ (function (_super) {
15601
15603
  returnValue.addKeysRow([" "], [{ width: "200px" }]);
15602
15604
  return returnValue;
15603
15605
  };
15606
+ /**
15607
+ * @param serializedObject
15608
+ * @param host
15609
+ * @hidden
15610
+ */
15611
+ VirtualKeyboard.prototype._parseFromContent = function (serializedObject, host) {
15612
+ var _this = this;
15613
+ _super.prototype._parseFromContent.call(this, serializedObject, host);
15614
+ for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
15615
+ var row = _a[_i];
15616
+ if (row.getClassName() === "StackPanel") {
15617
+ var stackPanel = row;
15618
+ var _loop_1 = function (key) {
15619
+ if (key.getClassName() === "Button" && key.name) {
15620
+ key.onPointerUpObservable.add(function () {
15621
+ _this.onKeyPressObservable.notifyObservers(key.name);
15622
+ });
15623
+ }
15624
+ };
15625
+ for (var _b = 0, _c = stackPanel.children; _b < _c.length; _b++) {
15626
+ var key = _c[_b];
15627
+ _loop_1(key);
15628
+ }
15629
+ }
15630
+ }
15631
+ };
15604
15632
  return VirtualKeyboard;
15605
15633
  }(_stackPanel__WEBPACK_IMPORTED_MODULE_2__.StackPanel));
15606
15634