@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.cjs +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
|
634
|
-
|
|
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 };
|