mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 02:21:53 +08:00
fixes
This commit is contained in:
@@ -71,6 +71,9 @@ export function Mouse(record_callback) {
|
|||||||
self.setSocket = function(ws) {
|
self.setSocket = function(ws) {
|
||||||
__ws = ws;
|
__ws = ws;
|
||||||
$("stream-box").classList.toggle("stream-box-mouse-enabled", ws);
|
$("stream-box").classList.toggle("stream-box-mouse-enabled", ws);
|
||||||
|
if (!__absolute && __isRelativeCaptured()) {
|
||||||
|
$("stream-box").exitPointerLock();
|
||||||
|
}
|
||||||
__updateOnlineLeds();
|
__updateOnlineLeds();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -79,9 +82,12 @@ export function Mouse(record_callback) {
|
|||||||
if (!("absolute" in state)) { // FIXME: SPI
|
if (!("absolute" in state)) { // FIXME: SPI
|
||||||
state.absolute = true;
|
state.absolute = true;
|
||||||
}
|
}
|
||||||
if (state.absolute && !__absolute && __isRelativeCaptured()) {
|
if (!__absolute && state.absolute && __isRelativeCaptured()) {
|
||||||
$("stream-box").exitPointerLock();
|
$("stream-box").exitPointerLock();
|
||||||
}
|
}
|
||||||
|
if (__absolute && !state.absolute) {
|
||||||
|
__relative_deltas = [];
|
||||||
|
}
|
||||||
__absolute = state.absolute;
|
__absolute = state.absolute;
|
||||||
__updateOnlineLeds();
|
__updateOnlineLeds();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user