feat: isCLickCOnfirmed prop

This commit is contained in:
karishmas6
2024-07-23 08:38:48 +05:30
parent 32e759367f
commit 843fbc6a75

View File

@@ -11,6 +11,7 @@ interface CanvasProps {
width: number;
height: number;
onCreateRef: CreateRefCallback;
isClickConfirmed: boolean;
}
/**
@@ -45,7 +46,8 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => {
switch (event.type) {
case 'mousedown':
const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height);
socket.emit('input:mousedown', clickCoordinates);
//socket.emit('input:mousedown', clickCoordinates);
console.log('you clicked on:', clickCoordinates);
notifyLastAction('click');
break;
case 'mousemove':