Commit b2f9eec0 authored by Julia Radzhabova's avatar Julia Radzhabova

[DE] Отладка выставления размеров фигур (при изменении одного измерения заполнять и второе).

parent e7d0abfc
...@@ -249,7 +249,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -249,7 +249,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
} }
if (this._changedProps) { if (this._changedProps) {
this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnShapeHeight.getNumberValue())); this.fillShapeHeight();
} }
}, this)); }, this));
this.spinners.push(this.spnShapeWidth); this.spinners.push(this.spnShapeWidth);
...@@ -276,7 +276,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -276,7 +276,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
} }
if (this._changedProps) { if (this._changedProps) {
this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnShapeWidth.getNumberValue())); this.fillShapeWidth();
} }
}, this)); }, this));
this.spinners.push(this.spnShapeHeight); this.spinners.push(this.spnShapeHeight);
...@@ -298,6 +298,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -298,6 +298,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_SizeRelH().put_Value(field.getNumberValue()); this._changedProps.get_SizeRelH().put_Value(field.getNumberValue());
this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom); this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom);
this.fillShapeHeight();
} }
}, this)); }, this));
...@@ -318,6 +320,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -318,6 +320,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_SizeRelV().put_Value(field.getNumberValue()); this._changedProps.get_SizeRelV().put_Value(field.getNumberValue());
this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom); this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom);
this.fillShapeWidth();
} }
}, this)); }, this));
...@@ -1772,6 +1776,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1772,6 +1776,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
if (this._changedProps) { if (this._changedProps) {
this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnShapeWidth.getNumberValue())); this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnShapeWidth.getNumberValue()));
this._changedProps.put_SizeRelH(undefined); this._changedProps.put_SizeRelH(undefined);
this.fillShapeHeight();
} }
this.chRatio.setDisabled(this.radioVSizePc.getValue()); this.chRatio.setDisabled(this.radioVSizePc.getValue());
this.cmbWidthPc.setDisabled(true); this.cmbWidthPc.setDisabled(true);
...@@ -1788,6 +1794,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1788,6 +1794,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_SizeRelH().put_Value(this.spnShapeWidthPc.getNumberValue()); this._changedProps.get_SizeRelH().put_Value(this.spnShapeWidthPc.getNumberValue());
this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom); this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom);
this.fillShapeHeight();
} }
this.chRatio.setDisabled(true); this.chRatio.setDisabled(true);
this.cmbWidthPc.setDisabled(false); this.cmbWidthPc.setDisabled(false);
...@@ -1801,6 +1809,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1801,6 +1809,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
if (this._changedProps) { if (this._changedProps) {
this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnShapeHeight.getNumberValue())); this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnShapeHeight.getNumberValue()));
this._changedProps.put_SizeRelV(undefined); this._changedProps.put_SizeRelV(undefined);
this.fillShapeWidth();
} }
this.chRatio.setDisabled(this.radioHSizePc.getValue()); this.chRatio.setDisabled(this.radioHSizePc.getValue());
this.cmbHeightPc.setDisabled(true); this.cmbHeightPc.setDisabled(true);
...@@ -1817,6 +1827,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1817,6 +1827,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._changedProps.get_SizeRelV().put_Value(this.spnShapeHeightPc.getNumberValue()); this._changedProps.get_SizeRelV().put_Value(this.spnShapeHeightPc.getNumberValue());
this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom); this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom);
this.fillShapeWidth();
} }
this.chRatio.setDisabled(true); this.chRatio.setDisabled(true);
this.cmbHeightPc.setDisabled(false); this.cmbHeightPc.setDisabled(false);
...@@ -1833,6 +1845,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1833,6 +1845,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._state.ShapeWidthPcFrom = record.value; this._state.ShapeWidthPcFrom = record.value;
this._changedProps.get_SizeRelH().put_Value(this.spnShapeWidthPc.getNumberValue()); this._changedProps.get_SizeRelH().put_Value(this.spnShapeWidthPc.getNumberValue());
this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom); this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom);
this.fillShapeHeight();
} }
}, },
...@@ -1844,6 +1858,32 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat ...@@ -1844,6 +1858,32 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
this._state.ShapeHeightPcFrom = record.value; this._state.ShapeHeightPcFrom = record.value;
this._changedProps.get_SizeRelV().put_Value(this.spnShapeHeightPc.getNumberValue()); this._changedProps.get_SizeRelV().put_Value(this.spnShapeHeightPc.getNumberValue());
this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom); this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom);
this.fillShapeWidth();
}
},
fillShapeWidth: function(combo, record){
if (this.radioHSize.getValue())
this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnShapeWidth.getNumberValue()));
else {
if (this._changedProps.get_SizeRelH()===null || this._changedProps.get_SizeRelH()===undefined)
this._changedProps.put_SizeRelH(new Asc.CImagePositionH());
this._changedProps.get_SizeRelH().put_Value(this.spnShapeWidthPc.getNumberValue());
this._changedProps.get_SizeRelH().put_RelativeFrom(this._state.ShapeWidthPcFrom);
}
},
fillShapeHeight: function(combo, record){
if (this.radioVSize.getValue())
this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnShapeHeight.getNumberValue()));
else {
if (this._changedProps.get_SizeRelV()===null || this._changedProps.get_SizeRelV()===undefined)
this._changedProps.put_SizeRelV(new Asc.CImagePositionV());
this._changedProps.get_SizeRelV().put_Value(this.spnShapeHeightPc.getNumberValue());
this._changedProps.get_SizeRelV().put_RelativeFrom(this._state.ShapeHeightPcFrom);
} }
}, },
......
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