@fieldnotes/core 0.2.1 → 0.2.3
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.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -1
package/dist/index.cjs
CHANGED
|
@@ -1507,6 +1507,7 @@ var Viewport = class {
|
|
|
1507
1507
|
if (!node) return;
|
|
1508
1508
|
this.interactingElementId = id;
|
|
1509
1509
|
node.style.pointerEvents = "auto";
|
|
1510
|
+
node.addEventListener("pointerdown", this.onInteractNodePointerDown);
|
|
1510
1511
|
window.addEventListener("keydown", this.onInteractKeyDown);
|
|
1511
1512
|
window.addEventListener("pointerdown", this.onInteractPointerDown);
|
|
1512
1513
|
}
|
|
@@ -1515,11 +1516,15 @@ var Viewport = class {
|
|
|
1515
1516
|
const node = this.domNodes.get(this.interactingElementId);
|
|
1516
1517
|
if (node) {
|
|
1517
1518
|
node.style.pointerEvents = "none";
|
|
1519
|
+
node.removeEventListener("pointerdown", this.onInteractNodePointerDown);
|
|
1518
1520
|
}
|
|
1519
1521
|
this.interactingElementId = null;
|
|
1520
1522
|
window.removeEventListener("keydown", this.onInteractKeyDown);
|
|
1521
1523
|
window.removeEventListener("pointerdown", this.onInteractPointerDown);
|
|
1522
1524
|
}
|
|
1525
|
+
onInteractNodePointerDown = (e) => {
|
|
1526
|
+
e.stopPropagation();
|
|
1527
|
+
};
|
|
1523
1528
|
onInteractKeyDown = (e) => {
|
|
1524
1529
|
if (e.key === "Escape") {
|
|
1525
1530
|
this.stopInteracting();
|
|
@@ -2420,7 +2425,7 @@ var ImageTool = class {
|
|
|
2420
2425
|
};
|
|
2421
2426
|
|
|
2422
2427
|
// src/index.ts
|
|
2423
|
-
var VERSION = "0.2.
|
|
2428
|
+
var VERSION = "0.2.3";
|
|
2424
2429
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2425
2430
|
0 && (module.exports = {
|
|
2426
2431
|
AddElementCommand,
|