From 88606283b7cbdcfa88d5592cdd42ed977aed42fe Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 16 Feb 2022 21:40:06 +0300 Subject: [PATCH] [DE] Chart styles refactoring --- .../main/app/view/ChartSettings.js | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/apps/documenteditor/main/app/view/ChartSettings.js b/apps/documenteditor/main/app/view/ChartSettings.js index a46fd8444..b97bcb5b1 100644 --- a/apps/documenteditor/main/app/view/ChartSettings.js +++ b/apps/documenteditor/main/app/view/ChartSettings.js @@ -75,10 +75,7 @@ define([ ChartStyle: 1, ChartType: -1, SeveralCharts: false, - DisabledControls: false, - // beginPreviewStyles: true, - // previewStylesCount: -1, - // currentStyleFound: false + DisabledControls: false }; this.lockedControls = []; this._locked = false; @@ -105,9 +102,7 @@ define([ if (this.api) { 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_onBeginChartStylesPreview', _.bind(this.onBeginChartStylesPreview, this)); this.api.asc_registerCallback('asc_onAddChartStylesPreview', _.bind(this.onAddChartStylesPreview, this)); - this.api.asc_registerCallback('asc_onEndChartStylesPreview', _.bind(this.onEndChartStylesPreview, 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){ var me = this; if (styles && styles.length>0){ @@ -477,8 +452,7 @@ define([ var rec = stylesStore.findWhere({ data: item.asc_getName() }); - if (rec) - rec.set('imageUrl', item.asc_getImage()); + rec && rec.set('imageUrl', item.asc_getImage()); }); } }