@canvas-harness/react 0.1.6 → 0.1.8

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 CHANGED
@@ -630,12 +630,8 @@ var useInteractionGesture = (ref, store, tool) => {
630
630
  if (hit?.kind === "body" && "nodeId" in hit) {
631
631
  const node = store.getNode(hit.nodeId);
632
632
  if (node) {
633
- const local = worldToNodeLocal(world, node);
634
- const clamped = {
635
- x: Math.max(0, Math.min(node.w, local.x)),
636
- y: Math.max(0, Math.min(node.h, local.y))
637
- };
638
- return { end: { nodeId: node.id, localOffset: clamped }, nodeId: node.id };
633
+ const localOffset = projectToNodeBoundary(world, node);
634
+ return { end: { nodeId: node.id, localOffset }, nodeId: node.id };
639
635
  }
640
636
  }
641
637
  return { end: { worldPoint: world }, nodeId: null };