[DE] Chart styles refactoring
This commit is contained in:
parent
d2622e2f5a
commit
88606283b7
|
@ -75,10 +75,7 @@ define([
|
||||||
ChartStyle: 1,
|
ChartStyle: 1,
|
||||||
ChartType: -1,
|
ChartType: -1,
|
||||||
SeveralCharts: false,
|
SeveralCharts: false,
|
||||||
DisabledControls: false,
|
DisabledControls: false
|
||||||
// beginPreviewStyles: true,
|
|
||||||
// previewStylesCount: -1,
|
|
||||||
// currentStyleFound: false
|
|
||||||
};
|
};
|
||||||
this.lockedControls = [];
|
this.lockedControls = [];
|
||||||
this._locked = false;
|
this._locked = false;
|
||||||
|
@ -105,9 +102,7 @@ define([
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
this.api.asc_registerCallback('asc_onImgWrapStyleChanged', _.bind(this._ChartWrapStyleChanged, this));
|
this.api.asc_registerCallback('asc_onImgWrapStyleChanged', _.bind(this._ChartWrapStyleChanged, this));
|
||||||
this.api.asc_registerCallback('asc_onUpdateChartStyles', _.bind(this._onUpdateChartStyles, this));
|
this.api.asc_registerCallback('asc_onUpdateChartStyles', _.bind(this._onUpdateChartStyles, this));
|
||||||
this.api.asc_registerCallback('asc_onBeginChartStylesPreview', _.bind(this.onBeginChartStylesPreview, this));
|
|
||||||
this.api.asc_registerCallback('asc_onAddChartStylesPreview', _.bind(this.onAddChartStylesPreview, this));
|
this.api.asc_registerCallback('asc_onAddChartStylesPreview', _.bind(this.onAddChartStylesPreview, this));
|
||||||
this.api.asc_registerCallback('asc_onEndChartStylesPreview', _.bind(this.onEndChartStylesPreview, this));
|
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -448,26 +443,6 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onBeginChartStylesPreview: function(count){
|
|
||||||
// this._state.beginPreviewStyles = true;
|
|
||||||
// this._state.currentStyleFound = false;
|
|
||||||
// this._state.previewStylesCount = count;
|
|
||||||
},
|
|
||||||
|
|
||||||
onEndChartStylesPreview: function(){
|
|
||||||
// if (this.cmbChartStyle) {
|
|
||||||
// if (this.cmbChartStyle.menuPicker.store.length>0) {
|
|
||||||
// // !this._state.currentStyleFound && this.selectCurrentChartStyle();
|
|
||||||
// this.cmbChartStyle.menuPicker.scroller.update({alwaysVisibleY: true});
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// this.cmbChartStyle.menuPicker.store.reset();
|
|
||||||
// this.cmbChartStyle.clearComboView();
|
|
||||||
// }
|
|
||||||
// this.cmbChartStyle.setDisabled(this.cmbChartStyle.menuPicker.store.length<1 || this._locked);
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
|
|
||||||
onAddChartStylesPreview: function(styles){
|
onAddChartStylesPreview: function(styles){
|
||||||
var me = this;
|
var me = this;
|
||||||
if (styles && styles.length>0){
|
if (styles && styles.length>0){
|
||||||
|
@ -477,8 +452,7 @@ define([
|
||||||
var rec = stylesStore.findWhere({
|
var rec = stylesStore.findWhere({
|
||||||
data: item.asc_getName()
|
data: item.asc_getName()
|
||||||
});
|
});
|
||||||
if (rec)
|
rec && rec.set('imageUrl', item.asc_getImage());
|
||||||
rec.set('imageUrl', item.asc_getImage());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue