mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
web limit mouse position
This commit is contained in:
parent
7b98777ed0
commit
3cd2e7bb52
@ -136,8 +136,8 @@ export function Mouse() {
|
||||
var __streamMoveHandler = function(event) {
|
||||
let rect = event.target.getBoundingClientRect();
|
||||
__current_pos = {
|
||||
x: Math.round(event.clientX - rect.left),
|
||||
y: Math.round(event.clientY - rect.top),
|
||||
x: Math.min(Math.round(event.clientX - rect.left), 0),
|
||||
y: Math.min(Math.round(event.clientY - rect.top), 0),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user