Test variant for working with column width and row height.
This commit is contained in:
parent
5854f4ea43
commit
ba6d82f741
|
@ -376,8 +376,10 @@ define([
|
||||||
maxValue: 55.88,
|
maxValue: 55.88,
|
||||||
minValue: 0
|
minValue: 0
|
||||||
});
|
});
|
||||||
this.numHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
this.numHeight.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
// this._changedProps.put_Height(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
|
var _props = new Asc.CTableProp();
|
||||||
|
_props.put_RowHeight(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
|
||||||
|
this.api.tblApply(_props);
|
||||||
}, this));
|
}, this));
|
||||||
this.lockedControls.push(this.numHeight);
|
this.lockedControls.push(this.numHeight);
|
||||||
this.spinners.push(this.numHeight);
|
this.spinners.push(this.numHeight);
|
||||||
|
@ -392,7 +394,9 @@ define([
|
||||||
minValue: 0
|
minValue: 0
|
||||||
});
|
});
|
||||||
this.numWidth.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
this.numWidth.on('change', _.bind(function(field, newValue, oldValue, eOpts){
|
||||||
// this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
|
var _props = new Asc.CTableProp();
|
||||||
|
_props.put_ColumnWidth(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
|
||||||
|
this.api.tblApply(_props);
|
||||||
}, this));
|
}, this));
|
||||||
this.lockedControls.push(this.numWidth);
|
this.lockedControls.push(this.numWidth);
|
||||||
this.spinners.push(this.numWidth);
|
this.spinners.push(this.numWidth);
|
||||||
|
@ -435,14 +439,14 @@ define([
|
||||||
this._originalProps = new Asc.CTableProp(props);
|
this._originalProps = new Asc.CTableProp(props);
|
||||||
this._originalProps.put_CellSelect(true);
|
this._originalProps.put_CellSelect(true);
|
||||||
|
|
||||||
var value = null;//props.get_Width();
|
var value = props.get_ColumnWidth();
|
||||||
if ( Math.abs(this._state.Width-value)>0.001 ||
|
if ((this._state.Width === null || this._state.Width === undefined) ||
|
||||||
(this._state.Width===null || value===null)&&(this._state.Width!==value)) {
|
Math.abs(this._state.Width-value)>0.001) {
|
||||||
this.numWidth.setValue((value !== null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
|
this.numWidth.setValue((value !== null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
|
||||||
}
|
}
|
||||||
value = null;//props.get_Height();
|
value = props.get_RowHeight();
|
||||||
if ( Math.abs(this._state.Height-value)>0.001 ||
|
if ((this._state.Height === null || this._state.Height === undefined) ||
|
||||||
(this._state.Height===null || value===null)&&(this._state.Height!==value)) {
|
Math.abs(this._state.Height-value)>0.001) {
|
||||||
this.numHeight.setValue((value !== null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
|
this.numHeight.setValue((value !== null) ? Common.Utils.Metric.fnRecalcFromMM(value) : '', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue