feat: use getMappedCoordinates for coordinates
This commit is contained in:
@@ -50,11 +50,8 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => {
|
||||
}
|
||||
switch (event.type) {
|
||||
case 'mousedown':
|
||||
// const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height);
|
||||
socket.emit('input:mousedown', {
|
||||
x: event.clientX,
|
||||
y: event.clientY,
|
||||
});
|
||||
const clickCoordinates = getMappedCoordinates(event, canvasRef.current, width, height);
|
||||
socket.emit('input:mousedown', clickCoordinates);
|
||||
notifyLastAction('click');
|
||||
break;
|
||||
case 'mousemove':
|
||||
|
||||
Reference in New Issue
Block a user