@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 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
- if (nodeHit) return nodeHit;
5857
- return hitTestEdge(store, worldPoint, cameraZ);
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;