[PE] Add custom path animation

This commit is contained in:
Julia Radzhabova 2022-08-11 18:54:02 +03:00
parent e249c54bdb
commit 8f88e5b12d
2 changed files with 7 additions and 4 deletions

View file

@ -849,8 +849,8 @@ define(function(){ 'use strict';
{group: 'menu-effect-group-path', value: AscFormat.MOTION_ARC_DOWN, iconCls: 'animation-motion-paths-arcs', displayValue: this.textArcs, familyEffect: 'patharcs'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_TURN_DOWN, iconCls: 'animation-motion-paths-turns', displayValue: this.textTurns, familyEffect: 'pathturns'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_CIRCLE, iconCls: 'animation-motion-paths-shapes', displayValue: this.textShapes, familyEffect: 'pathshapes'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, iconCls: 'animation-motion-paths-loops', displayValue: this.textLoops, familyEffect: 'pathloops'}//,
//{group: 'menu-effect-group-path', value: AscFormat.MOTION_CUSTOM_PATH, iconCls: 'animation-motion-paths-custom-path', displayValue: this.textCustomPath}
{group: 'menu-effect-group-path', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, iconCls: 'animation-motion-paths-loops', displayValue: this.textLoops, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', value: AscFormat.MOTION_CUSTOM_PATH, iconCls: 'animation-motion-paths-custom-path', displayValue: this.textCustomPath}
];
},
@ -1038,7 +1038,8 @@ define(function(){ 'use strict';
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_PEANUT, displayValue: this.textPeanut},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_POINTY_STAR, displayValue: this.textPointStar},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_SWOOSH, displayValue: this.textSwoosh},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_VERTICAL_FIGURE_8, displayValue: this.textVerticalFigure, familyEffect: 'pathloops'}
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_VERTICAL_FIGURE_8, displayValue: this.textVerticalFigure, familyEffect: 'pathloops'},
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CUSTOM_PATH, displayValue: this.textCustomPath, notsupported: true}
];
},

View file

@ -326,7 +326,9 @@ define([
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);
var prevEffect = this._state.Effect;
this._state.Effect = undefined;
this.addNewEffect(type, group, record.get('group'),prevEffect != AscFormat.ANIM_PRESET_NONE);
}
},