feat: handleMouseEventForGetText

This commit is contained in:
karishmas6
2024-07-26 03:44:58 +05:30
parent 58345600b0
commit f6d2b1dc31

View File

@@ -38,6 +38,18 @@ const Canvas = ({ width, height, onCreateRef }: CanvasProps) => {
const lastMousePosition = useRef<Coordinates>({ x: 0, y: 0 });
//const lastWheelPosition = useRef<ScrollDeltas>({ deltaX: 0, deltaY: 0 });
const handleMouseEventForGetText = useCallback((event: MouseEvent) => {
if (socket && getText) {
switch (event.type) {
case 'mousedown':
console.log('Handling text selection logic');
break;
default:
return;
}
}
}, [socket, getText]);
const onMouseEvent = useCallback((event: MouseEvent) => {
if (socket) {
const coordinates = {