allow drag of in-session windows to seamlessly move accross local browser windows.
This commit is contained in:
parent
9fbea8cd83
commit
db2addddce
|
@ -25,8 +25,8 @@ window.updateSetting = (name, value) => {
|
|||
}
|
||||
}
|
||||
|
||||
import "core-js/stable";
|
||||
import "regenerator-runtime/runtime";
|
||||
//import "core-js/stable";
|
||||
//import "regenerator-runtime/runtime";
|
||||
import * as Log from '../core/util/logging.js';
|
||||
import _, { l10n } from './localization.js';
|
||||
import { isTouchDevice, isSafari, hasScrollbarGutter, dragThreshold, supportsBinaryClipboard, isFirefox, isWindows, isIOS, supportsPointerLock }
|
||||
|
|
|
@ -1935,6 +1935,9 @@ export default class RFB extends EventTargetMixin {
|
|||
false, xvncButtonToMask(mappedButton));
|
||||
break;
|
||||
case 'mousemove':
|
||||
//when there are multiple screens
|
||||
//This window can get mouse move events when the cursor is outside of the window, if the mouse is down
|
||||
//when the cursor crosses the threshold of the window
|
||||
this._handleMouseMove(pos.x, pos.y);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -28,5 +28,21 @@ export function clientToElement(x, y, elem) {
|
|||
} else {
|
||||
pos.y = y - bounds.top;
|
||||
}
|
||||
|
||||
//multiple KasmVNC screens, Window can still receive mouse events when cursor goes
|
||||
//outside of the window if the mouse is down while the moving occurs
|
||||
if (x > window.innerWidth) {
|
||||
pos.x += (x - window.innerWidth);
|
||||
}
|
||||
else if (x < 0) {
|
||||
pos.x = x + bounds.left;
|
||||
}
|
||||
if (y > window.innerHeight) {
|
||||
pos.y += (y - window.innerHeight);
|
||||
}
|
||||
else if (y < 0) {
|
||||
pos.y = y + bounds.top;
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
|
4
vnc.html
4
vnc.html
|
@ -50,7 +50,7 @@
|
|||
<script src="vendor/interact.min.js"></script>
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<!--link rel="stylesheet" href="app/styles/base.css">
|
||||
<link rel="stylesheet" href="app/styles/base.css">
|
||||
|
||||
<script src="app/error-handler.js"></script>
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->
|
||||
<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Reference in New Issue