From 62c02860a84ae65f226b80bfa1cb120c4ee61b23 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 9 Sep 2024 05:19:15 +0530 Subject: [PATCH] feat: separate list & text capture --- src/components/atoms/canvas.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/atoms/canvas.tsx b/src/components/atoms/canvas.tsx index 3e9d89c0..654c782a 100644 --- a/src/components/atoms/canvas.tsx +++ b/src/components/atoms/canvas.tsx @@ -53,10 +53,11 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => { switch (event.type) { case 'mousedown': const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height); - if (getTextRef.current === true || getListRef.current === true) { - // todo: remove console.log and return - console.log('get text or get list is true'); - } else { + if (getTextRef.current === true) { + console.log('Capturing Text...'); + } else if (getListRef.current === true){ + console.log('Capturing List...'); + }else { socket.emit('input:mousedown', clickCoordinates); } notifyLastAction('click');