From cf3bf0ab2933e09646cc8570e672da51ba2cfa5c Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 8 Aug 2024 00:42:39 +0530 Subject: [PATCH] feat: check getListRef.current for mousedown --- 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 cbef98c2..cd0e2323 100644 --- a/src/components/atoms/canvas.tsx +++ b/src/components/atoms/canvas.tsx @@ -53,8 +53,8 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => { switch (event.type) { case 'mousedown': const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height); - if (getTextRef.current === true) { - console.log('get text') + if (getTextRef.current === true || getListRef.current === true) { + console.log('get text or get list is true'); } else { socket.emit('input:mousedown', clickCoordinates); }