@babylonjs/gui 5.51.0 → 5.53.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.
@@ -1060,7 +1060,7 @@ export class Control {
1060
1060
  this.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
1061
1061
  this.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
1062
1062
  const globalViewport = this._host._getGlobalViewport();
1063
- const projectedPosition = Vector3.Project(position, Matrix.Identity(), scene.getTransformMatrix(), globalViewport);
1063
+ const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);
1064
1064
  this._moveToProjectedPosition(projectedPosition);
1065
1065
  if (projectedPosition.z < 0 || projectedPosition.z > 1) {
1066
1066
  this.notRenderable = true;
@@ -1165,7 +1165,8 @@ export class Control {
1165
1165
  }
1166
1166
  let newLeft = projectedPosition.x + this._linkOffsetX.getValue(this._host) - this._currentMeasure.width / 2;
1167
1167
  let newTop = projectedPosition.y + this._linkOffsetY.getValue(this._host) - this._currentMeasure.height / 2;
1168
- if (this._left.ignoreAdaptiveScaling && this._top.ignoreAdaptiveScaling) {
1168
+ const leftAndTopIgnoreAdaptiveScaling = this._left.ignoreAdaptiveScaling && this._top.ignoreAdaptiveScaling;
1169
+ if (leftAndTopIgnoreAdaptiveScaling) {
1169
1170
  if (Math.abs(newLeft - oldLeft) < 0.5) {
1170
1171
  newLeft = oldLeft;
1171
1172
  }
@@ -1173,7 +1174,7 @@ export class Control {
1173
1174
  newTop = oldTop;
1174
1175
  }
1175
1176
  }
1176
- if (oldLeft === newLeft && oldTop === newTop) {
1177
+ if (!leftAndTopIgnoreAdaptiveScaling && oldLeft === newLeft && oldTop === newTop) {
1177
1178
  return;
1178
1179
  }
1179
1180
  this.left = newLeft + "px";