[DE] Form settings: use auto size of cell width
This commit is contained in:
parent
1ddd5b23d5
commit
5c8231afd9
|
@ -448,7 +448,7 @@ define([
|
|||
val = _.isEmpty(val) ? me.oldValue : Common.Utils.String.parseFloat(val);
|
||||
} else if(me.getValue() !== '') {
|
||||
if (me.checkAutoText(me.getValue())) {
|
||||
val = me.options.minValue-me.options.step;
|
||||
val = me.options.defaultValue-me.options.step;
|
||||
} else
|
||||
val = Common.Utils.String.parseFloat(me.getValue());
|
||||
if (isNaN(val))
|
||||
|
@ -536,6 +536,10 @@ define([
|
|||
return v_out;
|
||||
},
|
||||
|
||||
setDefaultValue: function(value) {
|
||||
this.options.defaultValue = value;
|
||||
},
|
||||
|
||||
checkAutoText: function(value) {
|
||||
if (this.options.allowAuto && typeof value == 'string') {
|
||||
var val = value.toLowerCase();
|
||||
|
|
|
@ -653,6 +653,12 @@ define([
|
|||
this._state.Width=val;
|
||||
}
|
||||
|
||||
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) : this.spnWidth.options.minValue);
|
||||
this._state.WidthPlaceholder=val;
|
||||
}
|
||||
|
||||
val = formTextPr.get_MaxCharacters();
|
||||
this.chMaxChars.setValue(val && val>=0);
|
||||
this.spnMaxChars.setDisabled(!val || val<0);
|
||||
|
|
Loading…
Reference in a new issue