[DE] Fix custom page size
This commit is contained in:
parent
6eb6cb1db5
commit
a7d388b996
|
@ -242,6 +242,14 @@ define([
|
|||
this.options.step = step;
|
||||
},
|
||||
|
||||
getMinValue: function(){
|
||||
return this.options.minValue;
|
||||
},
|
||||
|
||||
getMaxValue: function(){
|
||||
return this.options.maxValue;
|
||||
},
|
||||
|
||||
getNumberValue: function(){
|
||||
return this.checkAutoText(this.value) ? -1 : parseFloat(this.value);
|
||||
},
|
||||
|
|
|
@ -1079,7 +1079,7 @@ define([
|
|||
|
||||
val = this.api.asc_GetTextFormAutoWidth();
|
||||
if ( (this._state.WidthPlaceholder!==val) || Math.abs(this._state.WidthPlaceholder-val)>0.01) {
|
||||
this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.options.minValue);
|
||||
this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.getMinValue());
|
||||
this._state.WidthPlaceholder=val;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,8 +157,12 @@ define([
|
|||
this._noApply = true;
|
||||
if (record.value<0) {
|
||||
} else {
|
||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), true);
|
||||
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]), true);
|
||||
var w = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]),
|
||||
h = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]);
|
||||
if (w<this.spnWidth.getMinValue() || h<this.spnHeight.getMinValue())
|
||||
this.cmbPreset.setValue(-1);
|
||||
this.spnWidth.setValue(w, true);
|
||||
this.spnHeight.setValue(h, true);
|
||||
}
|
||||
this._noApply = false;
|
||||
}, this));
|
||||
|
|
Loading…
Reference in a new issue