From 3cd2e7bb520956a20116e2c3846f5b31660bc541 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 16 Jul 2019 03:20:18 +0300 Subject: web limit mouse position --- web/share/js/kvm/mouse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/share/js') 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), }; }; -- cgit v1.2.3