laymur 0.6.0 → 0.6.1

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/dist/index.js CHANGED
@@ -6730,13 +6730,13 @@ class UIFullscreenLayer extends UILayer {
6730
6730
  this.resizeInternal(window.innerWidth * scale, window.innerHeight * scale);
6731
6731
  };
6732
6732
  this._private_onDown = (event) => {
6733
- this._private_handleWindowInput(event, "onPointerDownInternal");
6733
+ this._private_handleWindowInput(event, "onPointerDownInternal", UIInputEvent.DOWN);
6734
6734
  };
6735
6735
  this._private_onMove = (event) => {
6736
- this._private_handleWindowInput(event, "onPointerMoveInternal");
6736
+ this._private_handleWindowInput(event, "onPointerMoveInternal", UIInputEvent.MOVE);
6737
6737
  };
6738
6738
  this._private_onUp = (event) => {
6739
- this._private_handleWindowInput(event, "onPointerUpInternal");
6739
+ this._private_handleWindowInput(event, "onPointerUpInternal", UIInputEvent.UP);
6740
6740
  };
6741
6741
  window.addEventListener("resize", this._private_onResize);
6742
6742
  window.addEventListener("pointerdown", this._private_onDown);
@@ -6797,7 +6797,7 @@ class UIFullscreenLayer extends UILayer {
6797
6797
  projectedPosition.y = MathUtils.mapLinear(projectedPosition.y, -1, 1, this.y, this.height);
6798
6798
  return projectedPosition;
6799
6799
  }
6800
- _private_handleWindowInput(event, pointerFunctionName) {
6800
+ _private_handleWindowInput(event, pointerFunctionName, inputEvent) {
6801
6801
  const rect = event.target instanceof HTMLElement
6802
6802
  ? event.target.getBoundingClientRect()
6803
6803
  : null;
@@ -6806,7 +6806,10 @@ class UIFullscreenLayer extends UILayer {
6806
6806
  ? rect.bottom - event.clientY
6807
6807
  : window.innerHeight - event.clientY;
6808
6808
  const scale = this._private_resizePolicyInternal["calculateScaleInternal"](window.innerWidth, window.innerHeight);
6809
- this[pointerFunctionName](x * scale, y * scale, event.pointerId);
6809
+ const scaledX = x * scale;
6810
+ const scaledY = y * scale;
6811
+ this[pointerFunctionName](scaledX, scaledY, event.pointerId);
6812
+ this.emit(inputEvent, scaledX, scaledY, event.pointerId);
6810
6813
  }
6811
6814
  }
6812
6815