From d788b0942884ff9f0bc7f2ec31ad6e998736cf43 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 26 Jul 2024 03:42:33 +0530 Subject: [PATCH] fix: -rm getText as dep. array --- src/components/atoms/canvas.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/atoms/canvas.tsx b/src/components/atoms/canvas.tsx index 2e262ba1..4e9afaa3 100644 --- a/src/components/atoms/canvas.tsx +++ b/src/components/atoms/canvas.tsx @@ -36,6 +36,7 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => { }; const lastMousePosition = useRef({ x: 0, y: 0 }); + //const lastWheelPosition = useRef({ deltaX: 0, deltaY: 0 }); const onMouseEvent = useCallback((event: MouseEvent) => { if (socket) { @@ -51,7 +52,6 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => { } else { socket.emit('input:mousedown', clickCoordinates); } - notifyLastAction('click'); break; case 'mousemove': const coordinates = getMappedCoordinates(event, canvasRef.current, width, height); @@ -82,7 +82,7 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => { return; } } - }, [socket, getText]); + }, [socket]); const onKeyboardEvent = useCallback((event: KeyboardEvent) => { if (socket) {