From 4b1d2b6dc30f1a414a6defc229cf59c789e6c44a Mon Sep 17 00:00:00 2001 From: OVSharova Date: Thu, 21 Oct 2021 20:49:25 +0300 Subject: [PATCH] Refactoring --- apps/presentationeditor/main/app/controller/Animation.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index 755d882f8..2ccddf8b8 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -144,12 +144,11 @@ define([ var type = record.get('value'); if (this._state.Effect !== type) { + this._state.Effect = type; var parameter = this.view.setMenuParameters(type); if (parameter) this.onParameterClick(parameter); } - this._state.Effect = type; - }, onStartSelect: function (combo, record) { @@ -218,9 +217,9 @@ define([ setSettings: function () { var me = this.view; - + var item; if (this._state.Effect !== undefined) { - var item = me.listEffects.store.findWhere({value: this._state.Effect}); + item = me.listEffects.store.findWhere({value: this._state.Effect}); me.listEffects.menuPicker.selectRecord(item ? item : me.listEffects.menuPicker.items[0]); this.view.btnParameters.setIconCls('toolbar__icon icon ' + item.get('imageUrl')); }