From fd6cd5a2889de9970341267abb356cd61ffc58b4 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Wed, 14 Dec 2022 11:50:16 +0300 Subject: [PATCH] bug 22445 --- apps/common/main/lib/component/Window.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index f312645cb..ce8de1c2c 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -265,8 +265,10 @@ define([ var top = main_geometry.top + Math.floor((parseInt(main_height) - parseInt(win_height)) / 2); var left = Math.floor((parseInt(main_width) - parseInt(win_width)) / 2); - this.$window.css('left',left < 0 ? 0 : left); - this.$window.css('top',top < 0 ? 0 : top); + this.$window.css({ + left: left < 0 ? 0 : left, + top: top < 0 ? 0 : top + }); } function _setVisible() { @@ -367,8 +369,10 @@ define([ top = top + win_height > main_height ? main_height - win_height : top; left = left + win_width > main_width ? main_width - win_width : left; - this.$window.css('left', left < 0 ? 0 : left); - this.$window.css('top', top < 0 ? 0 : top); + this.$window.css({ + left: left < 0 ? 0 : left, + top: top < 0 ? 0 : top + }); } /* window resize functions */