[DE] Fix Bug 44173 (#321)

This commit is contained in:
Julia Radzhabova 2020-01-29 14:12:29 +03:00 committed by GitHub
parent b5d15fe4e7
commit 67d523edea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -147,7 +147,7 @@ define([
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.arrange = wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon()) || content_locked;
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon()) || content_locked || (!!control_props && control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture);
if ( !disable.group ) {
if (me.api.CanGroup() || me.api.CanUnGroup()) {

View file

@ -2584,7 +2584,8 @@ define([
menuWrapPolygon.setDisabled(islocked || !me.api.CanChangeWrapPolygon());
}
me.menuImageWrap.setDisabled(islocked || value.imgProps.value.get_FromGroup() || (notflow && menuWrapPolygon.isDisabled()));
me.menuImageWrap.setDisabled(islocked || value.imgProps.value.get_FromGroup() || (notflow && menuWrapPolygon.isDisabled()) ||
(!!control_props && control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture));
var cancopy = me.api && me.api.can_CopyCut();
menuImgCopy.setDisabled(!cancopy);

View file

@ -74,7 +74,8 @@ define([
FromGroup: false,
DisabledControls: false,
isOleObject: false,
cropMode: false
cropMode: false,
isPictureControl: false
};
this.lockedControls = [];
this._locked = false;
@ -308,10 +309,13 @@ define([
value = props.get_CanBeFlow() && !this._locked;
var fromgroup = props.get_FromGroup() || this._locked;
if (this._state.CanBeFlow!==value || this._state.FromGroup!==fromgroup) {
this.cmbWrapType.setDisabled(!value || fromgroup);
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
isPictureControl = !!control_props && (control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture) || this._locked;
if (this._state.CanBeFlow!==value || this._state.FromGroup!==fromgroup || this._state.isPictureControl!==isPictureControl) {
this.cmbWrapType.setDisabled(!value || fromgroup || isPictureControl);
this._state.CanBeFlow=value;
this._state.FromGroup=fromgroup;
this._state.isPictureControl=isPictureControl;
}
value = props.get_Width();