revert shifting cursor position when scrubbing

a better solution is to allow moving cursor vertically
This commit is contained in:
Oleg Isonen committed 2022-10-17 00:45:57 +02:00
1 parent ee3eaa579b
commit 5d5fd4b10c
1 file changed
+1 -3
@@ -154,11 +154,9 @@ const requestPointerLock = (
cursorNode.style.filter = `drop-shadow(${
state.direction === "horizontal" ? "0 1px" : "1px 0"
} 1.1px rgba(0,0,0,.4))`;
// avoid obscuring anything that could be behind the cursor by offseting it after the target
const { top, height } = targetNode.getBoundingClientRect();
cursorNode.style.position = "absolute";
cursorNode.style.left = `${event.clientX}px`;
cursorNode.style.top = `${top + height}px`;
cursorNode.style.top = `${event.clientY}px`;
cursorNode.style.transform = `translate(-50%, -50%) ${
state.direction === "horizontal" ? "rotate(0deg)" : "rotate(90deg)"
}`;