Skip to content

Commit

Permalink
fix(hotkey): hide cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
AkiChase committed May 23, 2024
1 parent f19941f commit b1e3e34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ function addSightShortcuts(
);
mouseRangeBoxElement.remove();
}
maskElement.style.cursor = "pointer";

mouseLock = false;
loopDownKeyCBMap.delete(sightKeyMapping.key);
Expand All @@ -831,6 +832,7 @@ function addSightShortcuts(
// start sight mode

// create box element
maskElement.style.cursor = "none";
const mouseRangeBoxElement = createMouseRangeBox();
mouseRangeBoxElement.addEventListener("mouseleave", moveLeaveHandler);
document.body.appendChild(mouseRangeBoxElement);
Expand Down Expand Up @@ -950,6 +952,7 @@ function createMouseRangeBox(): HTMLElement {
box.style.right = "100px";
box.style.zIndex = "9999";
box.style.backgroundColor = "transparent";
box.style.cursor = "none";
return box;
}

Expand Down Expand Up @@ -978,7 +981,7 @@ function handleMouseDown(event: MouseEvent) {
const target = event.target;
if (!(target instanceof HTMLElement)) return;
if (target.id !== "maskElement" && target.id !== "mouseRangeBox") return;

mouseX = event.clientX;
mouseY = event.clientY;
event.preventDefault();
Expand Down

0 comments on commit b1e3e34

Please sign in to comment.