refactor: rm highlighter data check
This commit is contained in:
@@ -81,19 +81,8 @@ const Canvas = ({ width, height, onCreateRef, highlighterData }: CanvasProps) =>
|
|||||||
break;
|
break;
|
||||||
case 'mousedown':
|
case 'mousedown':
|
||||||
if (highlighterData) {
|
if (highlighterData) {
|
||||||
const highlightRect = highlighterData.rect;
|
setPendingClick(coordinates);
|
||||||
if (
|
setShowConfirmation(true);
|
||||||
coordinates.x >= highlightRect.left &&
|
|
||||||
coordinates.x <= highlightRect.right &&
|
|
||||||
coordinates.y >= highlightRect.top &&
|
|
||||||
coordinates.y <= highlightRect.bottom
|
|
||||||
) {
|
|
||||||
setPendingClick(coordinates);
|
|
||||||
setShowConfirmation(true);
|
|
||||||
} else {
|
|
||||||
socket.emit('input:mousedown', coordinates);
|
|
||||||
notifyLastAction('click');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
socket.emit('input:mousedown', coordinates);
|
socket.emit('input:mousedown', coordinates);
|
||||||
notifyLastAction('click');
|
notifyLastAction('click');
|
||||||
|
|||||||
Reference in New Issue
Block a user