diff options
author | Devaev Maxim <[email protected]> | 2019-07-16 03:20:18 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-07-16 03:20:18 +0300 |
commit | 3cd2e7bb520956a20116e2c3846f5b31660bc541 (patch) | |
tree | 2a961eb71120253ab094ff8a84106764abd5c02f /web | |
parent | 7b98777ed0deefe2055b201fb1e8d6ecb79a7d23 (diff) |
web limit mouse position
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/mouse.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index 5ec79444..6a2f9bba 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -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), }; }; |