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