@canvas-harness/core 0.1.12 → 0.1.13
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 +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5853,8 +5853,13 @@ var hitTestAny = (store, worldPoint, cameraZ, selectedNodes = /* @__PURE__ */ ne
|
|
|
5853
5853
|
}
|
|
5854
5854
|
}
|
|
5855
5855
|
const nodeHit = hitTestPoint(store, worldPoint, cameraZ, selectedNodes);
|
|
5856
|
-
|
|
5857
|
-
|
|
5856
|
+
const edgeHit = hitTestEdge(store, worldPoint, cameraZ);
|
|
5857
|
+
if (nodeHit && edgeHit && "edgeId" in edgeHit) {
|
|
5858
|
+
const nodeZ = store.getNode(nodeHit.nodeId)?.z ?? 0;
|
|
5859
|
+
const edgeZ = store.getEdge(edgeHit.edgeId)?.z ?? 0;
|
|
5860
|
+
return edgeZ >= nodeZ ? edgeHit : nodeHit;
|
|
5861
|
+
}
|
|
5862
|
+
return nodeHit ?? edgeHit;
|
|
5858
5863
|
};
|
|
5859
5864
|
var marqueeNodes = (store, rect) => {
|
|
5860
5865
|
const candidates = store.querySpatial({ rect }).nodes;
|