@fieldnotes/core 0.50.5 → 0.50.7
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 +16 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1954,7 +1954,7 @@ var InputHandler = class {
|
|
|
1954
1954
|
if (this.activePointers.has(e.pointerId)) {
|
|
1955
1955
|
this.activePointers.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
|
1956
1956
|
}
|
|
1957
|
-
if (this.activePointers.size
|
|
1957
|
+
if (this.activePointers.size >= 2) {
|
|
1958
1958
|
this.handlePinchMove();
|
|
1959
1959
|
return;
|
|
1960
1960
|
}
|
|
@@ -1988,9 +1988,15 @@ var InputHandler = class {
|
|
|
1988
1988
|
this.element.releasePointerCapture(e.pointerId);
|
|
1989
1989
|
} catch {
|
|
1990
1990
|
}
|
|
1991
|
-
this.activePointers.delete(e.pointerId);
|
|
1992
|
-
if (this.activePointers.size
|
|
1991
|
+
const removedActivePointer = this.activePointers.delete(e.pointerId);
|
|
1992
|
+
if (removedActivePointer && this.activePointers.size >= 2) {
|
|
1993
|
+
this.startPinch();
|
|
1994
|
+
} else if (this.activePointers.size < 2) {
|
|
1993
1995
|
this.lastPinchDistance = 0;
|
|
1996
|
+
const remainingPointer = this.activePointers.values().next().value;
|
|
1997
|
+
if (remainingPointer && this.isPanning) {
|
|
1998
|
+
this.lastPointer = { ...remainingPointer };
|
|
1999
|
+
}
|
|
1994
2000
|
}
|
|
1995
2001
|
if (this.isPanning && this.activePointers.size === 0) {
|
|
1996
2002
|
this.isPanning = false;
|
|
@@ -6496,7 +6502,7 @@ var RenderLoop = class {
|
|
|
6496
6502
|
layerGroups = /* @__PURE__ */ new Map();
|
|
6497
6503
|
gridCacheCanvas = null;
|
|
6498
6504
|
gridCacheCtx = null;
|
|
6499
|
-
|
|
6505
|
+
lastGridRefs = [];
|
|
6500
6506
|
constructor(deps) {
|
|
6501
6507
|
this.canvasEl = deps.canvasEl;
|
|
6502
6508
|
this.camera = deps.camera;
|
|
@@ -6696,8 +6702,8 @@ var RenderLoop = class {
|
|
|
6696
6702
|
}
|
|
6697
6703
|
if (gridElements.length > 0) {
|
|
6698
6704
|
const gridT0 = performance.now();
|
|
6699
|
-
const
|
|
6700
|
-
const gridDirty = this.gridCacheDirty ||
|
|
6705
|
+
const gridsChanged = gridElements.length !== this.lastGridRefs.length || gridElements.some((grid, index) => grid !== this.lastGridRefs[index]);
|
|
6706
|
+
const gridDirty = this.gridCacheDirty || gridsChanged;
|
|
6701
6707
|
if (gridDirty) {
|
|
6702
6708
|
this.ensureGridCache();
|
|
6703
6709
|
if (this.gridCacheCtx && this.gridCacheCanvas) {
|
|
@@ -6725,7 +6731,7 @@ var RenderLoop = class {
|
|
|
6725
6731
|
}
|
|
6726
6732
|
}
|
|
6727
6733
|
this.gridCacheDirty = false;
|
|
6728
|
-
this.
|
|
6734
|
+
this.lastGridRefs = [...gridElements];
|
|
6729
6735
|
}
|
|
6730
6736
|
if (this.gridCacheCanvas) {
|
|
6731
6737
|
const offset = this.marginViewport.compositeOffset(
|
|
@@ -6745,6 +6751,8 @@ var RenderLoop = class {
|
|
|
6745
6751
|
}
|
|
6746
6752
|
}
|
|
6747
6753
|
gridMs = performance.now() - gridT0;
|
|
6754
|
+
} else {
|
|
6755
|
+
this.lastGridRefs = [];
|
|
6748
6756
|
}
|
|
6749
6757
|
const overlayT0 = performance.now();
|
|
6750
6758
|
const activeTool = this.toolManager.activeTool;
|
|
@@ -10718,7 +10726,7 @@ var LaserTool = class {
|
|
|
10718
10726
|
};
|
|
10719
10727
|
|
|
10720
10728
|
// src/index.ts
|
|
10721
|
-
var VERSION = "0.50.
|
|
10729
|
+
var VERSION = "0.50.7";
|
|
10722
10730
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10723
10731
|
0 && (module.exports = {
|
|
10724
10732
|
ArrowTool,
|