feat: check getListRef.current for mousedown

This commit is contained in:
karishmas6
2024-08-08 00:42:39 +05:30
parent 8484e64770
commit cf3bf0ab29

View File

@@ -53,8 +53,8 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => {
switch (event.type) { switch (event.type) {
case 'mousedown': case 'mousedown':
const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height); const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height);
if (getTextRef.current === true) { if (getTextRef.current === true || getListRef.current === true) {
console.log('get text') console.log('get text or get list is true');
} else { } else {
socket.emit('input:mousedown', clickCoordinates); socket.emit('input:mousedown', clickCoordinates);
} }