[PE] Disable distribute for two or less objects when use "Align selected objects" option
This commit is contained in:
parent
55c9a030d3
commit
df9336fec8
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue