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