From 55dc6ae0cd1c7639034302ff2d2eb6594f27cf3b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 19 Mar 2019 15:54:20 +0300 Subject: [PATCH] [SSE] Fix Bug 40746 --- apps/common/main/lib/component/LoadMask.js | 10 ++++++++++ apps/spreadsheeteditor/main/app/controller/Main.js | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/LoadMask.js b/apps/common/main/lib/component/LoadMask.js index 48b3dcc06..abd38b62d 100644 --- a/apps/common/main/lib/component/LoadMask.js +++ b/apps/common/main/lib/component/LoadMask.js @@ -156,6 +156,16 @@ define([ isVisible: function() { return !_.isEmpty(loaderEl); + }, + + updatePosition: function() { + if (ownerEl && ownerEl.hasClass('masked') && loaderEl){ + loaderEl.css({ + top : Math.round(ownerEl.height() / 2 - (loaderEl.height() + parseInt(loaderEl.css('padding-top')) + parseInt(loaderEl.css('padding-bottom'))) / 2) + 'px', + left: Math.round(ownerEl.width() / 2 - (loaderEl.width() + parseInt(loaderEl.css('padding-left')) + parseInt(loaderEl.css('padding-right'))) / 2) + 'px' + + }); + } } } })()) diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 2ff2b7636..ee2c89be4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1833,8 +1833,10 @@ define([ case 'setMergeData': this.setMergeData(data.data); break; case 'getMergeData': this.getMergeData(); break; case 'setAppDisabled': - if (this.isAppDisabled===undefined && !data.data) // first editor opening + if (this.isAppDisabled===undefined && !data.data) { // first editor opening Common.NotificationCenter.trigger('layout:changed', 'main'); + this.loadMask && this.loadMask.isVisible() && this.loadMask.updatePosition(); + } this.isAppDisabled = data.data; break; case 'queryClose':