Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/useDrag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
() => gl.domElement.getBoundingClientRect(),
// Size dependency ensures the clientRect updates when container dimensions change.
// Without it, drag calculations would use stale positioning data from the previous container size.
[gl.domElement, size]

Check warning on line 51 in src/utils/useDrag.ts

View workflow job for this annotation

GitHub Actions / build

React Hook useMemo has an unnecessary dependency: 'size'. Either exclude it or remove the dependency array
);

return useGesture(
Expand All @@ -58,7 +58,7 @@
const { eventObject, point } = event;

// Save the offset of click point from object origin
eventObject.getWorldPosition(offset).sub(point);
offset.setFromMatrixPosition(eventObject.matrixWorld).sub(point);

// Set initial 3D cursor position (needed for onDrag plane calculation)
mouse3D.copy(point);
Expand Down