feat: separate list & text capture
This commit is contained in:
@@ -53,10 +53,11 @@ 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 || getListRef.current === true) {
|
if (getTextRef.current === true) {
|
||||||
// todo: remove console.log and return
|
console.log('Capturing Text...');
|
||||||
console.log('get text or get list is true');
|
} else if (getListRef.current === true){
|
||||||
} else {
|
console.log('Capturing List...');
|
||||||
|
}else {
|
||||||
socket.emit('input:mousedown', clickCoordinates);
|
socket.emit('input:mousedown', clickCoordinates);
|
||||||
}
|
}
|
||||||
notifyLastAction('click');
|
notifyLastAction('click');
|
||||||
|
|||||||
Reference in New Issue
Block a user