[PDF] Hide grouping of shapes

This commit is contained in:
Julia Radzhabova
2024-04-15 15:47:06 +03:00
parent 103a98f32c
commit 5b8a5c768d
3 changed files with 30 additions and 14 deletions

View File

@ -362,6 +362,8 @@ define([
this.api.asc_registerCallback('asc_onVerticalTextAlign', _.bind(this.onApiVerticalTextAlign, this));
this.api.asc_registerCallback('asc_onTextColor', _.bind(this.onApiTextColor, this));
this.api.asc_registerCallback('asc_onTextHighLight', _.bind(this.onApiTextHighlightColor, this));
// this.api.asc_registerCallback('asc_onCanGroup', _.bind(this.onApiCanGroup, this));
// this.api.asc_registerCallback('asc_onCanUnGroup', _.bind(this.onApiCanUnGroup, this));
},
setApi: function(api) {
@ -1535,6 +1537,20 @@ define([
}
},
onApiCanGroup: function(value) {
if (this._state.can_group!==value) {
this.toolbar.mnuGroupShapes.setDisabled(!value);
if (this._state.activated) this._state.can_group = value;
}
},
onApiCanUnGroup: function(value) {
if (this._state.can_ungroup!==value) {
this.toolbar.mnuUnGroupShapes.setDisabled(!value);
if (this._state.activated) this._state.can_ungroup = value;
}
},
onIncrease: function(e) {
if (this.api)
this.api.FontSizeIn();

View File

@ -574,9 +574,9 @@ define([
me.mnuArrangeBack,
me.mnuArrangeForward,
me.mnuArrangeBackward,
{caption: '--'},
me.mnuGroupImg,
me.mnuUnGroupImg
// {caption: '--'},
// me.mnuGroupImg,
// me.mnuUnGroupImg
]
})
});

View File

@ -707,17 +707,17 @@ define([
iconCls: 'menu__icon btn-arrange-backward',
value: 4
}),
{caption: '--'},
this.mnuGroupShapes = new Common.UI.MenuItem({
caption: this.txtGroup,
iconCls: 'menu__icon btn-shape-group',
value: 5
}),
this.mnuUnGroupShapes = new Common.UI.MenuItem({
caption: this.txtUngroup,
iconCls: 'menu__icon btn-shape-ungroup',
value: 6
})
// {caption: '--'},
// this.mnuGroupShapes = new Common.UI.MenuItem({
// caption: this.txtGroup,
// iconCls: 'menu__icon btn-shape-group',
// value: 5
// }),
// this.mnuUnGroupShapes = new Common.UI.MenuItem({
// caption: this.txtUngroup,
// iconCls: 'menu__icon btn-shape-ungroup',
// value: 6
// })
]
}),
dataHint: '1',