mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
refactoring
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user