[PE] Fix bugs

This commit is contained in:
Julia Radzhabova 2022-01-21 13:19:13 +03:00
parent c57670fc71
commit 44fd700fc3
2 changed files with 7 additions and 4 deletions

View file

@ -319,7 +319,10 @@ define([
onEffectSelect: function (combo, record) { onEffectSelect: function (combo, record) {
if (this.api) { if (this.api) {
var type = record.get('value'); var type = record.get('value');
var group = (type != AscFormat.ANIM_PRESET_NONE) ? _.findWhere(this.EffectGroups, {id: record.get('group')}).value : undefined; if (type===AscFormat.ANIM_PRESET_MULTIPLE) return;
var group = _.findWhere(this.EffectGroups, {id: record.get('group')});
group = group ? group.value : undefined;
this.addNewEffect(type, group, record.get('group'),this._state.Effect != AscFormat.ANIM_PRESET_NONE); this.addNewEffect(type, group, record.get('group'),this._state.Effect != AscFormat.ANIM_PRESET_NONE);
} }
}, },
@ -331,8 +334,6 @@ define([
} }
}, },
onCheckRewindChange: function (field, newValue, oldValue, eOpts) { onCheckRewindChange: function (field, newValue, oldValue, eOpts) {
if (this.api && this.AnimationProperties) { if (this.api && this.AnimationProperties) {
this.AnimationProperties.asc_putRewind(field.getValue() == 'checked'); this.AnimationProperties.asc_putRewind(field.getValue() == 'checked');

View file

@ -505,10 +505,12 @@ define([
me.fireEvent('animation:addanimation', [picker, record]); me.fireEvent('animation:addanimation', [picker, record]);
}); });
menu.off('show:before', onShowBefore); menu.off('show:before', onShowBefore);
menu.on('show:after', function () {
picker.scroller.update({alwaysVisibleY: true});
});
me.btnAddAnimation.menu.setInnerMenu([{menu: picker, index: 0}]); me.btnAddAnimation.menu.setInnerMenu([{menu: picker, index: 0}]);
}; };
me.btnAddAnimation.menu.on('show:before', onShowBefore); me.btnAddAnimation.menu.on('show:before', onShowBefore);
setEvents.call(me); setEvents.call(me);
}); });
}, },