modern-canvas 0.27.3 → 0.27.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.
Files changed (2) hide show
  1. package/dist/index.js +15 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8527,6 +8527,21 @@ var Da = class extends Gr {
8527
8527
  return !1;
8528
8528
  }
8529
8529
  input(e, t) {
8530
+ if (this._overflowHidden && (t === "pointerdown" || t === "pointermove" || t === "pointerup")) {
8531
+ let { screenX: n, screenY: r } = e;
8532
+ if (n && r) {
8533
+ let i = {
8534
+ x: n,
8535
+ y: r
8536
+ };
8537
+ this.getViewport()?.toCanvasGlobal(i, i);
8538
+ let a = this.globalAabb;
8539
+ if (i.x < a.min.x || i.x >= a.min.x + a.size.x || i.y < a.min.y || i.y >= a.min.y + a.size.y) {
8540
+ this.isVisibleInTree() && this._input(e, t);
8541
+ return;
8542
+ }
8543
+ }
8544
+ }
8530
8545
  let n = this.getChildren(!0);
8531
8546
  for (let r = n.length - 1; r >= 0; r--) n[r].input(e, t);
8532
8547
  this.isVisibleInTree() && this._input(e, t);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.27.3",
4
+ "version": "0.27.4",
5
5
  "packageManager": "pnpm@10.19.0",
6
6
  "description": "A JavaScript WebGL rendering engine. only the ESM.",
7
7
  "author": "wxm",