mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-02-22 23:12:16 +08:00
fix(hotkey): hide cursor
This commit is contained in:
parent
f19941f8bd
commit
b1e3e34e17
@ -811,6 +811,7 @@ function addSightShortcuts(
|
|||||||
);
|
);
|
||||||
mouseRangeBoxElement.remove();
|
mouseRangeBoxElement.remove();
|
||||||
}
|
}
|
||||||
|
maskElement.style.cursor = "pointer";
|
||||||
|
|
||||||
mouseLock = false;
|
mouseLock = false;
|
||||||
loopDownKeyCBMap.delete(sightKeyMapping.key);
|
loopDownKeyCBMap.delete(sightKeyMapping.key);
|
||||||
@ -831,6 +832,7 @@ function addSightShortcuts(
|
|||||||
// start sight mode
|
// start sight mode
|
||||||
|
|
||||||
// create box element
|
// create box element
|
||||||
|
maskElement.style.cursor = "none";
|
||||||
const mouseRangeBoxElement = createMouseRangeBox();
|
const mouseRangeBoxElement = createMouseRangeBox();
|
||||||
mouseRangeBoxElement.addEventListener("mouseleave", moveLeaveHandler);
|
mouseRangeBoxElement.addEventListener("mouseleave", moveLeaveHandler);
|
||||||
document.body.appendChild(mouseRangeBoxElement);
|
document.body.appendChild(mouseRangeBoxElement);
|
||||||
@ -950,6 +952,7 @@ function createMouseRangeBox(): HTMLElement {
|
|||||||
box.style.right = "100px";
|
box.style.right = "100px";
|
||||||
box.style.zIndex = "9999";
|
box.style.zIndex = "9999";
|
||||||
box.style.backgroundColor = "transparent";
|
box.style.backgroundColor = "transparent";
|
||||||
|
box.style.cursor = "none";
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -978,7 +981,7 @@ function handleMouseDown(event: MouseEvent) {
|
|||||||
const target = event.target;
|
const target = event.target;
|
||||||
if (!(target instanceof HTMLElement)) return;
|
if (!(target instanceof HTMLElement)) return;
|
||||||
if (target.id !== "maskElement" && target.id !== "mouseRangeBox") return;
|
if (target.id !== "maskElement" && target.id !== "mouseRangeBox") return;
|
||||||
|
|
||||||
mouseX = event.clientX;
|
mouseX = event.clientX;
|
||||||
mouseY = event.clientY;
|
mouseY = event.clientY;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user