modern-canvas 0.27.2 → 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.
- package/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7954,8 +7954,8 @@ var Z = {
|
|
|
7954
7954
|
update() {
|
|
7955
7955
|
let e = this._parent, t = this.node;
|
|
7956
7956
|
if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, ua.ltr), t.hasNewLayout())) {
|
|
7957
|
-
let { left: n, top: r, width: i, height: a } = t.getComputedLayout(), o = e.getParent()?.globalDisplay === "flex", s = o ? n : Number(e.style.left) || 0, c = o ? r : Number(e.style.top) || 0;
|
|
7958
|
-
(!Number.isNaN(s) && s !== e.position.x || !Number.isNaN(c) && c !== e.position.y) && e.position.set(s, c), (!Number.isNaN(
|
|
7957
|
+
let { left: n, top: r, width: i, height: a } = t.getComputedLayout(), o = e.getParent()?.globalDisplay === "flex", s = o ? n : Number(e.style.left) || 0, c = o ? r : Number(e.style.top) || 0, l = o || typeof e.style.width != "number" ? i : e.style.width, u = o || typeof e.style.height != "number" ? a : e.style.height;
|
|
7958
|
+
(!Number.isNaN(s) && s !== e.position.x || !Number.isNaN(c) && c !== e.position.y) && e.position.set(s, c), !Number.isNaN(l) && !Number.isNaN(u) && (l !== e.size.x || u !== e.size.y) && e.size.set(l, u), t.markLayoutSeen();
|
|
7959
7959
|
}
|
|
7960
7960
|
}
|
|
7961
7961
|
destroy() {
|
|
@@ -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);
|