Commit 2d7812fe authored by Julia Radzhabova's avatar Julia Radzhabova

[DE] Bug 32436

parent cba1eaea
...@@ -190,6 +190,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -190,6 +190,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
if (btn.pressed && this.spnHeight.getNumberValue()>0) { if (btn.pressed && this.spnHeight.getNumberValue()>0) {
this._nRatio = this.spnWidth.getNumberValue()/this.spnHeight.getNumberValue(); this._nRatio = this.spnWidth.getNumberValue()/this.spnHeight.getNumberValue();
} }
if (this._changedProps) {
this._changedProps.asc_putLockAspect(btn.pressed);
}
}, this)); }, this));
// Shape Size // Shape Size
...@@ -227,6 +230,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -227,6 +230,9 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
if ((field.getValue()=='checked') && this.spnShapeHeight.getNumberValue()>0) { if ((field.getValue()=='checked') && this.spnShapeHeight.getNumberValue()>0) {
this._nRatio = this.spnShapeWidth.getNumberValue()/this.spnShapeHeight.getNumberValue(); this._nRatio = this.spnShapeWidth.getNumberValue()/this.spnShapeHeight.getNumberValue();
} }
if (this._changedProps) {
this._changedProps.asc_putLockAspect(field.getValue()=='checked');
}
}, this)); }, this));
this.spnShapeWidth = new Common.UI.MetricSpinner({ this.spnShapeWidth = new Common.UI.MetricSpinner({
...@@ -1250,10 +1256,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1250,10 +1256,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._objectType = Asc.c_oAscTypeSelectElement.Shape; this._objectType = Asc.c_oAscTypeSelectElement.Shape;
this._setShapeDefaults(shapeprops); this._setShapeDefaults(shapeprops);
this.setTitle(this.textTitleShape); this.setTitle(this.textTitleShape);
value = Common.localStorage.getItem("de-settings-shaperatio"); value = props.asc_getLockAspect();
if (value!==null && parseInt(value) == 1) { this.chRatio.setValue(value);
this.chRatio.setValue(true);
}
this.spnShapeWidth.setMaxValue(this.sizeMax.width); this.spnShapeWidth.setMaxValue(this.sizeMax.width);
this.spnShapeHeight.setMaxValue(this.sizeMax.height); this.spnShapeHeight.setMaxValue(this.sizeMax.height);
...@@ -1312,20 +1316,15 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1312,20 +1316,15 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this.btnsCategory[5].setDisabled(null === margins); // Margins this.btnsCategory[5].setDisabled(null === margins); // Margins
} else { } else {
value = props.asc_getLockAspect();
if (chartprops) { if (chartprops) {
this._objectType = Asc.c_oAscTypeSelectElement.Chart; this._objectType = Asc.c_oAscTypeSelectElement.Chart;
this.setTitle(this.textTitleChart); this.setTitle(this.textTitleChart);
value = Common.localStorage.getItem("de-settings-chartratio");
} }
else { else {
this.setTitle(this.textTitle); this.setTitle(this.textTitle);
value = Common.localStorage.getItem("de-settings-imageratio");
if (value===null) value = 1;
}
if (value!==null && parseInt(value) == 1) {
this.btnRatio.toggle(true);
} }
this.btnRatio.toggle(value);
this.spnWidth.setMaxValue(this.sizeMax.width); this.spnWidth.setMaxValue(this.sizeMax.width);
this.spnHeight.setMaxValue(this.sizeMax.height); this.spnHeight.setMaxValue(this.sizeMax.height);
...@@ -1340,19 +1339,6 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1340,19 +1339,6 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
}, },
getSettings: function() { getSettings: function() {
if (this._objectType==Asc.c_oAscTypeSelectElement.Shape) {
if (!this.chRatio.isDisabled())
Common.localStorage.setItem("de-settings-shaperatio", (this.chRatio.getValue()=='checked') ? 1 : 0);
} else {
var value = (this.btnRatio.pressed) ? 1 : 0;
if (this._objectType==Asc.c_oAscTypeSelectElement.Chart) {
Common.localStorage.setItem("de-settings-chartratio", value);
}
else {
Common.localStorage.setItem("de-settings-imageratio", value);
}
}
var properties = this._changedProps; var properties = this._changedProps;
if (this._objectType == Asc.c_oAscTypeSelectElement.Shape) { if (this._objectType == Asc.c_oAscTypeSelectElement.Shape) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment