Fix bugs
This commit is contained in:
parent
e79216b581
commit
20dff7b2fb
|
@ -870,8 +870,8 @@ define(function(){ 'use strict';
|
|||
{group: 'menu-effect-group-path', value: AscFormat.MOTION_TRAPEZOID, iconCls: 'animation-motion_paths-shapes', displayValue: this.textTrapezoid},
|
||||
{group: 'menu-effect-group-path', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, iconCls: 'animation-motion_paths-loops', displayValue: this.textHorizontalFigure},
|
||||
{group: 'menu-effect-group-path', value: AscFormat.MOTION_VERTICAL_FIGURE_8, iconCls: 'animation-motion_paths-loops', displayValue: this.textVerticalFigure},
|
||||
{group: 'menu-effect-group-path', value: AscFormat.MOTION_LOOP_DE_LOOP, iconCls: 'animation-motion_paths-loops', displayValue: this.textLoopDeLoop},
|
||||
{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_LOOP_DE_LOOP, iconCls: 'animation-motion_paths-loops', displayValue: this.textLoopDeLoop}//,
|
||||
//{group: 'menu-effect-group-path', value: AscFormat.MOTION_CUSTOM_PATH, iconCls: 'animation-motion_paths-custom_path', displayValue: this.textCustomPath}
|
||||
];
|
||||
},
|
||||
|
||||
|
|
|
@ -156,12 +156,13 @@ define([
|
|||
onAnimationAdditional: function(replace) { // replace or add new additional effect
|
||||
var me = this;
|
||||
(new PE.Views.AnimationDialog({
|
||||
api : this.api,
|
||||
activeEffect : this._state.Effect,
|
||||
handler: function(result, value) {
|
||||
api : this.api,
|
||||
activeEffect : this._state.Effect,
|
||||
groupValue : this._state.EffectGroup,
|
||||
handler : function(result, value) {
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
me.addNewEffect(value.activeEffect, value.activeGroupValue, replace);
|
||||
me.addNewEffect(value.activeEffect, value.activeGroupValue, value.activeGroup, replace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -170,13 +171,13 @@ define([
|
|||
|
||||
onAddAnimation: function(picker, record) {
|
||||
var type = record.get('value');
|
||||
var group = _.findWhere(Common.define.effectData.getEffectGroupData(), {id: record.get('group')}).value;
|
||||
this.addNewEffect(type, group, false);
|
||||
var group = _.findWhere(this.EffectGroups, {id: record.get('group')}).value;
|
||||
this.addNewEffect(type, group, record.get('group'), false);
|
||||
},
|
||||
|
||||
addNewEffect: function (type, group, replace) {
|
||||
addNewEffect: function (type, group, groupName, replace) {
|
||||
if (this._state.Effect == type) return;
|
||||
var parameter = this.view.setMenuParameters(type, undefined, group == this._state.EffectGroups);
|
||||
var parameter = this.view.setMenuParameters(type, groupName, undefined);
|
||||
this.api.asc_AddAnimation(group, type, (parameter != undefined)?parameter:0, replace);
|
||||
this._state.EffectGroups = group;
|
||||
this._state.Effect = type;
|
||||
|
@ -236,14 +237,13 @@ define([
|
|||
onEffectSelect: function (combo, record) {
|
||||
if (this.api) {
|
||||
var type = record.get('value');
|
||||
var group = (type != AscFormat.ANIM_PRESET_NONE) ? _.findWhere(Common.define.effectData.getEffectGroupData(), {id: record.get('group')}).value : undefined;
|
||||
this.addNewEffect(type, group, this._state.Effect != AscFormat.ANIM_PRESET_NONE);
|
||||
var group = (type != AscFormat.ANIM_PRESET_NONE) ? _.findWhere(this.EffectGroups, {id: record.get('group')}).value : undefined;
|
||||
this.addNewEffect(type, group, record.get('group'),this._state.Effect != AscFormat.ANIM_PRESET_NONE);
|
||||
}
|
||||
},
|
||||
|
||||
onStartSelect: function (combo, record) {
|
||||
if (this.api) {
|
||||
// this._state.StartEffect = record.value;
|
||||
this.AnimationProperties.asc_putStartType(record.value);
|
||||
this.api.asc_SetAnimationProperties(this.AnimationProperties);
|
||||
}
|
||||
|
@ -341,8 +341,8 @@ define([
|
|||
}
|
||||
|
||||
this._state.EffectOption = this.AnimationProperties.asc_getSubtype();
|
||||
if (this._state.EffectOption !== undefined)
|
||||
this._state.noAnimationParam = view.setMenuParameters(this._state.Effect, this._state.EffectOption)===undefined;
|
||||
if (this._state.EffectOption !== undefined && this._state.EffectOption !== null)
|
||||
this._state.noAnimationParam = view.setMenuParameters(this._state.Effect, _.findWhere(this.EffectGroups,{value: this._state.EffectGroup}).id, this._state.EffectOption)===undefined;
|
||||
|
||||
value = this.AnimationProperties.asc_getDuration();
|
||||
if (Math.abs(this._state.Duration - value) > 0.001 ||
|
||||
|
|
|
@ -477,9 +477,9 @@ define([
|
|||
return this.lockedControls;
|
||||
},
|
||||
|
||||
setMenuParameters: function (effectId, option)
|
||||
setMenuParameters: function (effectId, effectGroup, option)
|
||||
{
|
||||
var effect = _.findWhere(this.allEffects, {value: effectId});
|
||||
var effect = _.findWhere(this.allEffects, {group: effectGroup, value: effectId});
|
||||
var arrEffectOptions = Common.define.effectData.getEffectOptionsData(effect.group, effect.value);
|
||||
if(!arrEffectOptions) {
|
||||
this.btnParameters.menu.removeAll();
|
||||
|
|
|
@ -72,9 +72,9 @@ define([
|
|||
this.EffectGroupData.forEach(function (item) {item.displayValue = item.caption;});
|
||||
if ((this.options.activeEffect != undefined) && (this.options.activeEffect != AscFormat.ANIM_PRESET_NONE)){
|
||||
this._state.activeEffect = this.options.activeEffect;
|
||||
var itemEffect = _.findWhere(this.allEffects,{value: this._state.activeEffect});
|
||||
this._state.activeGroup = itemEffect.group;
|
||||
this._state.activeGroupValue = _.findWhere(this.EffectGroupData, {id: this._state.activeGroup}).value;
|
||||
this._state.activeGroupValue = this.options.groupValue;
|
||||
this._state.activeGroup = _.findWhere(this.EffectGroupData, {value: this._state.activeGroupValue}).id;
|
||||
var itemEffect = _.findWhere(this.allEffects,{group: this._state.activeGroup, value: this._state.activeEffect});
|
||||
this.activeLevel = itemEffect.level;
|
||||
}
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
|
|
|
@ -2101,6 +2101,7 @@
|
|||
"PE.Views.Toolbar.textAlignMiddle": "Align text to the middle",
|
||||
"PE.Views.Toolbar.textAlignRight": "Align text right",
|
||||
"PE.Views.Toolbar.textAlignTop": "Align text to the top",
|
||||
"PE.Views.Toolbar.textTabAnimation": "Animation",
|
||||
"PE.Views.Toolbar.textArrangeBack": "Send to Background",
|
||||
"PE.Views.Toolbar.textArrangeBackward": "Send Backward",
|
||||
"PE.Views.Toolbar.textArrangeForward": "Bring Forward",
|
||||
|
|
Loading…
Reference in a new issue