Charts refactoring
This commit is contained in:
parent
edd0580546
commit
b4e8567481
|
@ -1090,7 +1090,7 @@ define([
|
|||
if (props) {
|
||||
(ischartedit) ? props.changeType(type) : props.putType(type);
|
||||
var range = props.getRange(),
|
||||
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !props.getInColumns(), props.getType()) : Asc.c_oAscError.ID.No;
|
||||
isvalid = (!_.isEmpty(range)) ? me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, props.getInRows(), props.getType()) : Asc.c_oAscError.ID.No;
|
||||
if (isvalid == Asc.c_oAscError.ID.No) {
|
||||
(ischartedit) ? me.api.asc_editChartDrawingObject(props) : me.api.asc_addChartDrawingObject(props);
|
||||
} else {
|
||||
|
|
|
@ -859,7 +859,7 @@ define([
|
|||
validation = function(value) {
|
||||
var isvalid;
|
||||
if (!_.isEmpty(value)) {
|
||||
isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, true, !props.getInColumns(), me._state.ChartType);
|
||||
isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, value, true, props.getInRows(), me._state.ChartType);
|
||||
if (isvalid == Asc.c_oAscError.ID.No)
|
||||
return true;
|
||||
} else return '';
|
||||
|
|
|
@ -1572,7 +1572,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
|||
var rec = this.mnuChartTypePicker.getSelectedRec();
|
||||
rec && (type = rec.get('type'));
|
||||
}
|
||||
isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, !this.chartSettings.getInColumns(), type);
|
||||
isvalid = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, range, true, this.chartSettings.getInRows(), type);
|
||||
if (isvalid == Asc.c_oAscError.ID.No)
|
||||
return true;
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue