Fix locking right panes

This commit is contained in:
Julia Radzhabova 2022-09-07 23:02:43 +03:00
parent 7bb35e8071
commit 866d831ae2
7 changed files with 27 additions and 37 deletions

View file

@ -131,10 +131,8 @@ define([
this.chartProps = props.get_ChartProperties(); this.chartProps = props.get_ChartProperties();
value = props.get_SeveralCharts() || this._locked; value = props.get_SeveralCharts() || this._locked;
if (this._state.SeveralCharts!==value) { this.btnEditData.setDisabled(value);
this.btnEditData.setDisabled(value); this._state.SeveralCharts=value;
this._state.SeveralCharts=value;
}
value = props.get_SeveralChartTypes(); value = props.get_SeveralChartTypes();
if (this._state.SeveralCharts && value) { if (this._state.SeveralCharts && value) {
@ -178,11 +176,9 @@ define([
value = props.get_CanBeFlow() && !this._locked; value = props.get_CanBeFlow() && !this._locked;
var fromgroup = props.get_FromGroup() || this._locked; var fromgroup = props.get_FromGroup() || this._locked;
if (this._state.CanBeFlow!==value || this._state.FromGroup!==fromgroup) { this.cmbWrapType.setDisabled(!value || fromgroup);
this.cmbWrapType.setDisabled(!value || fromgroup); this._state.CanBeFlow=value;
this._state.CanBeFlow=value; this._state.FromGroup=fromgroup;
this._state.FromGroup=fromgroup;
}
value = props.get_Width(); value = props.get_Width();
if ( Math.abs(this._state.Width-value)>0.001 ) { if ( Math.abs(this._state.Width-value)>0.001 ) {

View file

@ -400,12 +400,10 @@ define([
var fromgroup = props.get_FromGroup() || this._locked; var fromgroup = props.get_FromGroup() || this._locked;
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null, var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
isPictureControl = !!control_props && (control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture) && !control_props.get_FormPr() || this._locked; isPictureControl = !!control_props && (control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture) && !control_props.get_FormPr() || this._locked;
if (this._state.CanBeFlow!==value || this._state.FromGroup!==fromgroup || this._state.isPictureControl!==isPictureControl) { this.cmbWrapType.setDisabled(!value || fromgroup || isPictureControl);
this.cmbWrapType.setDisabled(!value || fromgroup || isPictureControl); this._state.CanBeFlow=value;
this._state.CanBeFlow=value; this._state.FromGroup=fromgroup;
this._state.FromGroup=fromgroup; this._state.isPictureControl=isPictureControl;
this._state.isPictureControl=isPictureControl;
}
value = props.get_Width(); value = props.get_Width();
if ( Math.abs(this._state.Width-value)>0.001 ) { if ( Math.abs(this._state.Width-value)>0.001 ) {
@ -426,12 +424,12 @@ define([
if (this._state.isOleObject!==value) { if (this._state.isOleObject!==value) {
this.btnSelectImage.setVisible(!value); this.btnSelectImage.setVisible(!value);
this.btnEditObject.setVisible(value); this.btnEditObject.setVisible(value);
this.btnRotate270.setDisabled(value);
this.btnRotate90.setDisabled(value);
this.btnFlipV.setDisabled(value);
this.btnFlipH.setDisabled(value);
this._state.isOleObject=value; this._state.isOleObject=value;
} }
this.btnRotate270.setDisabled(value || this._locked);
this.btnRotate90.setDisabled(value || this._locked);
this.btnFlipV.setDisabled(value || this._locked);
this.btnFlipH.setDisabled(value || this._locked);
if (this._state.isOleObject) { if (this._state.isOleObject) {
var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); var plugin = DE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});

View file

@ -851,11 +851,9 @@ define([
value = props.get_CanBeFlow() && !this._locked; value = props.get_CanBeFlow() && !this._locked;
var fromgroup = props.get_FromGroup() || this._locked; var fromgroup = props.get_FromGroup() || this._locked;
if (this._state.CanBeFlow!==value || this._state.FromGroup!==fromgroup) { this.cmbWrapType.setDisabled(!value || fromgroup);
this.cmbWrapType.setDisabled(!value || fromgroup); this._state.CanBeFlow=value;
this._state.CanBeFlow=value; this._state.FromGroup=fromgroup;
this._state.FromGroup=fromgroup;
}
// background colors // background colors
var rec = null; var rec = null;

View file

@ -628,9 +628,9 @@ define([
value = props.get_RowsInHeader(); value = props.get_RowsInHeader();
if ( this._state.RepeatRow!==value ) { if ( this._state.RepeatRow!==value ) {
this.chRepeatRow.setValue(!!value, true); this.chRepeatRow.setValue(!!value, true);
this.chRepeatRow.setDisabled(value === null);
this._state.RepeatRow=value; this._state.RepeatRow=value;
} }
this.chRepeatRow.setDisabled(this._state.RepeatRow === null || this._locked);
} }
}, },

View file

@ -114,10 +114,8 @@ define([
this.chartProps = props.get_ChartProperties(); this.chartProps = props.get_ChartProperties();
var value = props.get_SeveralCharts() || this._locked; var value = props.get_SeveralCharts() || this._locked;
if (this._state.SeveralCharts!==value) { this.btnEditData.setDisabled(value);
this.btnEditData.setDisabled(value); this._state.SeveralCharts=value;
this._state.SeveralCharts=value;
}
value = props.get_SeveralChartTypes(); value = props.get_SeveralChartTypes();
if (this._state.SeveralCharts && value) { if (this._state.SeveralCharts && value) {

View file

@ -350,12 +350,12 @@ define([
if (this._state.isOleObject!==value) { if (this._state.isOleObject!==value) {
this.btnSelectImage.setVisible(!value); this.btnSelectImage.setVisible(!value);
this.btnEditObject.setVisible(value); this.btnEditObject.setVisible(value);
this.btnRotate270.setDisabled(value);
this.btnRotate90.setDisabled(value);
this.btnFlipV.setDisabled(value);
this.btnFlipH.setDisabled(value);
this._state.isOleObject=value; this._state.isOleObject=value;
} }
this.btnRotate270.setDisabled(value || this._locked);
this.btnRotate90.setDisabled(value || this._locked);
this.btnFlipV.setDisabled(value || this._locked);
this.btnFlipH.setDisabled(value || this._locked);
if (this._state.isOleObject) { if (this._state.isOleObject) {
var plugin = PE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); var plugin = PE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});

View file

@ -450,12 +450,12 @@ define([
if (this._state.isOleObject!==value) { if (this._state.isOleObject!==value) {
this.btnSelectImage.setVisible(!value); this.btnSelectImage.setVisible(!value);
this.btnEditObject.setVisible(value); this.btnEditObject.setVisible(value);
this.btnRotate270.setDisabled(value);
this.btnRotate90.setDisabled(value);
this.btnFlipV.setDisabled(value);
this.btnFlipH.setDisabled(value);
this._state.isOleObject=value; this._state.isOleObject=value;
} }
this.btnRotate270.setDisabled(value || this._locked);
this.btnRotate90.setDisabled(value || this._locked);
this.btnFlipV.setDisabled(value || this._locked);
this.btnFlipH.setDisabled(value || this._locked);
if (this._state.isOleObject) { if (this._state.isOleObject) {
var plugin = SSE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid}); var plugin = SSE.getCollection('Common.Collections.Plugins').findWhere({guid: pluginGuid});