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) {
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);
}