mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
don't loose focus on stream resizing
This commit is contained in:
parent
52d2b8a315
commit
1c3c1baf9a
@ -91,7 +91,7 @@ function Stream(ui) {
|
|||||||
var el_stream_image = $("stream-image");
|
var el_stream_image = $("stream-image");
|
||||||
el_stream_image.style.width = __normal_size.width * __size_factor + "px";
|
el_stream_image.style.width = __normal_size.width * __size_factor + "px";
|
||||||
el_stream_image.style.height = __normal_size.height * __size_factor + "px";
|
el_stream_image.style.height = __normal_size.height * __size_factor + "px";
|
||||||
ui.showWindow($("stream-window"));
|
ui.showWindow($("stream-window"), false);
|
||||||
};
|
};
|
||||||
|
|
||||||
var __refreshImage = function() {
|
var __refreshImage = function() {
|
||||||
|
|||||||
@ -70,7 +70,7 @@ function Ui(hid) {
|
|||||||
|
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
self.showWindow = function(el_window) {
|
self.showWindow = function(el_window, raise=true) {
|
||||||
if (!__isWindowOnPage(el_window) || el_window.hasAttribute("data-centered")) {
|
if (!__isWindowOnPage(el_window) || el_window.hasAttribute("data-centered")) {
|
||||||
var view = __getViewGeometry();
|
var view = __getViewGeometry();
|
||||||
var rect = el_window.getBoundingClientRect();
|
var rect = el_window.getBoundingClientRect();
|
||||||
@ -79,7 +79,9 @@ function Ui(hid) {
|
|||||||
el_window.setAttribute("data-centered", "");
|
el_window.setAttribute("data-centered", "");
|
||||||
}
|
}
|
||||||
el_window.style.visibility = "visible";
|
el_window.style.visibility = "visible";
|
||||||
__raiseWindow(el_window);
|
if (raise) {
|
||||||
|
__raiseWindow(el_window);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var __isWindowOnPage = function(el_window) {
|
var __isWindowOnPage = function(el_window) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user