mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 13:05:08 +09:00
revert shifting cursor position when scrubbing
a better solution is to allow moving cursor vertically
This commit is contained in:
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)"
|
||||
}`;
|
||||
|
||||
Reference in new issue
Block a user