don't loose focus on stream resizing

This commit is contained in:
Devaev Maxim 2018-08-24 08:23:46 +03:00
parent 52d2b8a315
commit 1c3c1baf9a
2 changed files with 5 additions and 3 deletions

View File

@ -91,7 +91,7 @@ function Stream(ui) {
var el_stream_image = $("stream-image");
el_stream_image.style.width = __normal_size.width * __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() {

View File

@ -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")) {
var view = __getViewGeometry();
var rect = el_window.getBoundingClientRect();
@ -79,7 +79,9 @@ function Ui(hid) {
el_window.setAttribute("data-centered", "");
}
el_window.style.visibility = "visible";
if (raise) {
__raiseWindow(el_window);
}
};
var __isWindowOnPage = function(el_window) {