[DE] Add editing wrap boundary to toolbar

This commit is contained in:
Julia Radzhabova 2021-01-13 16:51:55 +03:00
parent 28fb3ff98d
commit 03f75be8b9
2 changed files with 13 additions and 1 deletions

View file

@ -139,6 +139,7 @@ define([
_.each(me.toolbar.btnImgWrapping.menu.items, function(item) {
item.setDisabled(notflow);
});
me.toolbar.btnImgWrapping.menu.items[8].setDisabled(!me.api.CanChangeWrapPolygon());
var control_props = me.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
@ -210,6 +211,12 @@ define([
},
onClickMenuWrapping: function (menu, item, e) {
if (item.options.wrapType=='edit') {
this.api.StartChangeWrapPolygon();
this.toolbar.fireEvent('editcomplete', this.toolbar);
return;
}
var props = new Asc.asc_CImgProperty();
props.put_WrappingStyle(item.options.wrapType);

View file

@ -1544,7 +1544,7 @@ define([
me.btnImgWrapping.updateHint(me.tipImgWrapping);
me.btnImgWrapping.setMenu(new Common.UI.Menu({
cls: 'ppm-toolbar',
cls: 'ppm-toolbar shifted-right',
items: [{
caption : _holder_view.txtInline,
iconCls : 'menu__icon wrap-inline',
@ -1594,6 +1594,11 @@ define([
wrapType : Asc.c_oAscWrapStyle2.Behind,
checkmark : false,
checkable : true
},
{ caption: '--' },
{
caption : _holder_view.textEditWrapBoundary,
wrapType : 'edit'
}
]
}));