diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 5bbf9c766..57420d6a8 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -1216,6 +1216,8 @@ define([ this.toolbar.mniAlignObjects.setDisabled(value<2); this.toolbar.mniAlignObjects.setChecked(value>1 && !slide_checked, true); this.toolbar.mniAlignToSlide.setChecked(value<2 || slide_checked, true); + this.toolbar.mniDistribHor.setDisabled(value<3 && this.toolbar.mniAlignObjects.isChecked()); + this.toolbar.mniDistribVert.setDisabled(value<3 && this.toolbar.mniAlignObjects.isChecked()); }, onShapeAlign: function(menu, item) { diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 3ea28f179..fc7c1fb3b 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -607,6 +607,17 @@ define([ Common.Utils.InternalSettings.set("pe-align-to-slide", false); }); + me.mniDistribHor = new Common.UI.MenuItem({ + caption: me.txtDistribHor, + iconCls: 'mnu-distrib-hor', + value: 6 + }); + me.mniDistribVert = new Common.UI.MenuItem({ + caption: me.txtDistribVert, + iconCls: 'mnu-distrib-vert', + value: 7 + }); + me.btnShapeAlign = new Common.UI.Button({ id: 'id-toolbar-btn-shape-align', cls: 'btn-toolbar', @@ -645,16 +656,8 @@ define([ value: Asc.c_oAscAlignShapeType.ALIGN_BOTTOM }, {caption: '--'}, - { - caption: me.txtDistribHor, - iconCls: 'mnu-distrib-hor', - value: 6 - }, - { - caption: me.txtDistribVert, - iconCls: 'mnu-distrib-vert', - value: 7 - }, + me.mniDistribHor, + me.mniDistribVert, {caption: '--'}, me.mniAlignToSlide, me.mniAlignObjects