From d05770fe6b24612e8890c281d053d7362eefa056 Mon Sep 17 00:00:00 2001 From: OVSharova Date: Thu, 21 Oct 2021 18:06:24 +0300 Subject: [PATCH] Fix bug --- .../main/app/controller/Transitions.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/Transitions.js b/apps/presentationeditor/main/app/controller/Transitions.js index 09a8a81a2..ec3d2bee5 100644 --- a/apps/presentationeditor/main/app/controller/Transitions.js +++ b/apps/presentationeditor/main/app/controller/Transitions.js @@ -76,6 +76,8 @@ define([ } }); + this._noApply = false; + }, onLaunch: function () { @@ -122,12 +124,12 @@ define([ }, onParameterClick: function (item) { - this.EffectType = item.value; + this._state.EffectType = item.value; if (this.api && !this._noApply) { var props = new Asc.CAscSlideProps(); var transition = new Asc.CAscSlideTransition(); - transition.put_TransitionType(this.Effect); - transition.put_TransitionOption(this.EffectType); + transition.put_TransitionType(this._state.Effect); + transition.put_TransitionOption(this._state.EffectType); props.put_transition(transition); this.api.SetSlideProps(props); } @@ -181,22 +183,24 @@ define([ onEffectSelect: function (combo, record) { var type = record.get('value'); - if (this.Effect !== type && - !((this.Effect === Asc.c_oAscSlideTransitionTypes.Wipe || this.Effect === Asc.c_oAscSlideTransitionTypes.UnCover || this.Effect === Asc.c_oAscSlideTransitionTypes.Cover)&& + if (this._state.Effect !== type && + !((this._state.Effect === Asc.c_oAscSlideTransitionTypes.Wipe || this._state.Effect === Asc.c_oAscSlideTransitionTypes.UnCover || this._state.Effect === Asc.c_oAscSlideTransitionTypes.Cover)&& (type === Asc.c_oAscSlideTransitionTypes.Wipe || type === Asc.c_oAscSlideTransitionTypes.UnCover || type === Asc.c_oAscSlideTransitionTypes.Cover))) { var parameter = this.view.setMenuParameters(type); if (parameter) this.onParameterClick(parameter); } - this.Effect = type; + this._state.Effect = type; if (this.api && !this._noApply) { var props = new Asc.CAscSlideProps(); var transition = new Asc.CAscSlideTransition(); transition.put_TransitionType(type); - transition.put_TransitionOption(this.EffectType); + transition.put_TransitionOption(this._state.EffectType); props.put_transition(transition); this.api.SetSlideProps(props); + + this._state.Effect = type; } },