Skip to content

Commit

Permalink
fix missing prop
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Nov 9, 2024
1 parent 1695265 commit 43a43b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/surface/useCreateSurface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ function useGestureEvent() {
containerId: undefined,
position: { x: 0, y: 0 },
inputType: 'unknown',
touchesCount: 0,
preventDefault: () => {
ref.current.defaultPrevented = true;
},
Expand All @@ -452,6 +453,7 @@ function useGestureEvent() {
ref.current.position = { x: 0, y: 0 };
ref.current.inputType = 'unknown';
ref.current.defaultPrevented = false;
ref.current.touchesCount = 0;
}, []);

const copyFrom = useCallback((info: CanvasGestureInput) => {
Expand All @@ -461,6 +463,7 @@ function useGestureEvent() {
ref.current.distance = info.distance;
ref.current.intentional = info.intentional;
ref.current.targetId = info.targetId;
ref.current.touchesCount = info.touchesCount;
}, []);

return [ref, reset, copyFrom] as const;
Expand Down

0 comments on commit 43a43b4

Please sign in to comment.