From 6730c16ceeffe3c751527b902a3c6f42af0e30a1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 18 Mar 2022 13:23:22 +0300 Subject: [PATCH 1/2] [SSE] For Bug 44858 --- .../spreadsheeteditor/main/app/controller/DocumentHolder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index ff6f867fe..a435a66f6 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -2347,10 +2347,12 @@ define([ menu.cmpEl.attr({tabindex: "-1"}); } - var coord = me.api.asc_getActiveCellCoord(), + var coord = me.api.asc_getActiveCellCoord(validation), // get merged cell for validation offset = {left:0,top:0}, - showPoint = [coord.asc_getX() + offset.left, (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top]; + showPoint = [coord.asc_getX() + offset.left + (validation ? coord.asc_getWidth() : 0), (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top]; + menuContainer.css({left: showPoint[0], top : showPoint[1]}); + menu.menuAlign = validation ? 'tr-br' : 'tl-bl'; me._preventClick = validation; validation && menuContainer.attr('data-value', 'prevent-canvas-click'); From 5147704a86f784c4e1c05b969dbb00dbc4937862 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 18 Mar 2022 14:47:11 +0300 Subject: [PATCH 2/2] [SSE] Change position for table total menu --- apps/spreadsheeteditor/main/app/controller/DocumentHolder.js | 2 +- apps/spreadsheeteditor/main/app/view/DocumentHolder.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index a435a66f6..b21b03b87 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -2407,7 +2407,7 @@ define([ var coord = me.api.asc_getActiveCellCoord(), offset = {left:0,top:0}, - showPoint = [coord.asc_getX() + offset.left, (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top]; + showPoint = [coord.asc_getX() + offset.left + coord.asc_getWidth(), (coord.asc_getY() < 0 ? 0 : coord.asc_getY()) + coord.asc_getHeight() + offset.top]; menuContainer.css({left: showPoint[0], top : showPoint[1]}); me._preventClick = true; diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index ee6847814..39d91d1bd 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -1103,6 +1103,7 @@ define([ this.tableTotalMenu = new Common.UI.Menu({ maxHeight: 160, + menuAlign: 'tr-br', cyclic: false, cls: 'lang-menu', items: [