summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/share/js/kvm/mouse.js6
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);