From a4e4dfbbd149f40e850fb7c01d7f08c16d8dd08e Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Tue, 23 Jul 2024 20:46:12 +0530 Subject: [PATCH] refactor: rm highlighter data check --- src/components/atoms/canvas.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/components/atoms/canvas.tsx b/src/components/atoms/canvas.tsx index b0b779d8..f8c906f4 100644 --- a/src/components/atoms/canvas.tsx +++ b/src/components/atoms/canvas.tsx @@ -81,19 +81,8 @@ const Canvas = ({ width, height, onCreateRef, highlighterData }: CanvasProps) => break; case 'mousedown': if (highlighterData) { - const highlightRect = highlighterData.rect; - if ( - coordinates.x >= highlightRect.left && - coordinates.x <= highlightRect.right && - coordinates.y >= highlightRect.top && - coordinates.y <= highlightRect.bottom - ) { - setPendingClick(coordinates); - setShowConfirmation(true); - } else { - socket.emit('input:mousedown', coordinates); - notifyLastAction('click'); - } + setPendingClick(coordinates); + setShowConfirmation(true); } else { socket.emit('input:mousedown', coordinates); notifyLastAction('click');