feat: separate list & text capture

This commit is contained in:
karishmas6
2024-09-09 05:19:15 +05:30
parent 7813c9849b
commit 62c02860a8

View File

@@ -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');