diff options
author | Maxim Devaev <[email protected]> | 2022-05-24 00:19:04 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-05-24 00:19:04 +0300 |
commit | 70461b6192d36c42cd4722f4f371f859029d07f1 (patch) | |
tree | 509411cfbc9a8442ab798670b488179aa17cf235 /web | |
parent | 55e67e32ae40c7774b160906458faaa9b98b813a (diff) |
refactoring
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/mouse.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index 3be12cd7..096eebc6 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -158,10 +158,6 @@ export function Mouse(__getGeometry, __recordWsEvent) { return (document.pointerLockElement === $("stream-box")); }; - var __isRelativeSquashed = function() { - return $("hid-mouse-squash-switch").checked; - }; - var __relativeCapturedHandler = function() { tools.info("Relative mouse", (__isRelativeCaptured() ? "captured" : "released"), "by pointer lock"); __updateOnlineLeds(); @@ -209,7 +205,7 @@ export function Mouse(__getGeometry, __recordWsEvent) { x: Math.min(Math.max(-127, Math.floor(event.movementX * __relative_sens)), 127), y: Math.min(Math.max(-127, Math.floor(event.movementY * __relative_sens)), 127), }; - if (__isRelativeSquashed()) { + if ($("hid-mouse-squash-switch").checked) { __relative_deltas.push(delta); } else { tools.debug("Mouse: relative:", delta); |