This commit is contained in:
OVSharova 2022-01-21 02:17:16 +03:00
parent 19960b2305
commit 21a9d01568

View file

@ -507,7 +507,8 @@ define([
var effect = _.findWhere(this.allEffects, {group: effectGroup, value: effectId}); var effect = _.findWhere(this.allEffects, {group: effectGroup, value: effectId});
if(effect) if(effect)
arrEffectOptions = Common.define.effectData.getEffectOptionsData(effect.group, effect.value); arrEffectOptions = Common.define.effectData.getEffectOptionsData(effect.group, effect.value);
if((this._effectId != effectId && this._familyEffect != effect.familyEffect) || (this._groupName != effectGroup)) { var updateFamilyEffect = (!this._familyEffect && !effect.familyEffect) ? true : (this._familyEffect != effect.familyEffect);
if((this._effectId != effectId && updateFamilyEffect) || (this._groupName != effectGroup)) {
this.btnParameters.menu.removeAll(); this.btnParameters.menu.removeAll();
} }
if (arrEffectOptions){ if (arrEffectOptions){
@ -520,7 +521,7 @@ define([
}, this); }, this);
(effect.familyEffect) && this.btnParameters.menu.addItem({caption: '--'}); (effect.familyEffect) && this.btnParameters.menu.addItem({caption: '--'});
} else { } else {
this.btnParameters.menu.items.forEach(function (opt,index) { this.btnParameters.menu.items.forEach(function (opt) {
if(opt.toggleGroup == 'animateeffects' && opt.value == option) if(opt.toggleGroup == 'animateeffects' && opt.value == option)
selectedElement = opt; selectedElement = opt;
},this); },this);
@ -539,7 +540,7 @@ define([
}, this); }, this);
} }
else { else {
this.btnParameters.menu.items.forEach(function (opt,index) { this.btnParameters.menu.items.forEach(function (opt) {
if(opt.toggleGroup == 'animatesimilareffects' && opt.value == effectId) if(opt.toggleGroup == 'animatesimilareffects' && opt.value == effectId)
opt.setChecked(true); opt.setChecked(true);
}); });