[DE] Fix custom page size

This commit is contained in:
Julia Radzhabova 2021-09-07 20:58:45 +03:00
parent 6eb6cb1db5
commit a7d388b996
3 changed files with 15 additions and 3 deletions

View file

@ -242,6 +242,14 @@ define([
this.options.step = step; this.options.step = step;
}, },
getMinValue: function(){
return this.options.minValue;
},
getMaxValue: function(){
return this.options.maxValue;
},
getNumberValue: function(){ getNumberValue: function(){
return this.checkAutoText(this.value) ? -1 : parseFloat(this.value); return this.checkAutoText(this.value) ? -1 : parseFloat(this.value);
}, },

View file

@ -1079,7 +1079,7 @@ define([
val = this.api.asc_GetTextFormAutoWidth(); val = this.api.asc_GetTextFormAutoWidth();
if ( (this._state.WidthPlaceholder!==val) || Math.abs(this._state.WidthPlaceholder-val)>0.01) { 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; this._state.WidthPlaceholder=val;
} }

View file

@ -157,8 +157,12 @@ define([
this._noApply = true; this._noApply = true;
if (record.value<0) { if (record.value<0) {
} else { } else {
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), true); var w = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]),
this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]), true); 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._noApply = false;
}, this)); }, this));