summaryrefslogtreecommitdiff
path: root/kvmd/web/js/mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/web/js/mouse.js')
-rw-r--r--kvmd/web/js/mouse.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/kvmd/web/js/mouse.js b/kvmd/web/js/mouse.js
index 1ba1f850..9ee92053 100644
--- a/kvmd/web/js/mouse.js
+++ b/kvmd/web/js/mouse.js
@@ -38,7 +38,17 @@ function Mouse() {
}
};
- self.updateLeds = function() {
+ var __hoverStream = function() {
+ __stream_hovered = true;
+ __updateLeds();
+ };
+
+ var __leaveStream = function() {
+ __stream_hovered = false;
+ __updateLeds();
+ };
+
+ var __updateLeds = function() {
if (__ws && __stream_hovered) {
$("hid-mouse-led").className = "led-on";
$("hid-mouse-led").title = "Mouse tracked";
@@ -48,16 +58,6 @@ function Mouse() {
}
};
- var __hoverStream = function() {
- __stream_hovered = true;
- self.updateLeds();
- };
-
- var __leaveStream = function() {
- __stream_hovered = false;
- self.updateLeds();
- };
-
var __touchHandler = function(event, state) {
if (state) {
var rect = event.touches[0].target.getBoundingClientRect();