Merge pull request #1506 from ONLYOFFICE/fix/pe-animation

[PE] Fix bugs
This commit is contained in:
Julia Radzhabova 2022-01-21 13:26:28 +03:00 committed by GitHub
commit 931ad0b7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -319,7 +319,10 @@ define([
onEffectSelect: function (combo, record) {
if (this.api) {
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);
}
},
@ -331,8 +334,6 @@ define([
}
},
onCheckRewindChange: function (field, newValue, oldValue, eOpts) {
if (this.api && this.AnimationProperties) {
this.AnimationProperties.asc_putRewind(field.getValue() == 'checked');

View file

@ -505,10 +505,12 @@ define([
me.fireEvent('animation:addanimation', [picker, record]);
});
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.on('show:before', onShowBefore);
setEvents.call(me);
});
},