From 579357a0c65bb7d5a9f3ba64951d6d23629f2aef Mon Sep 17 00:00:00 2001 From: OVSharova Date: Fri, 17 Dec 2021 03:30:16 +0300 Subject: [PATCH] Set move animations --- .../main/app/controller/Animation.js | 18 ++++++++++++++---- .../main/app/view/Animation.js | 4 ++-- .../main/app/view/Toolbar.js | 4 +++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/Animation.js b/apps/presentationeditor/main/app/controller/Animation.js index b1960c8c6..2fa58f41b 100644 --- a/apps/presentationeditor/main/app/controller/Animation.js +++ b/apps/presentationeditor/main/app/controller/Animation.js @@ -187,11 +187,15 @@ define([ }, onMoveEarlier: function () { - + if(this.api) { + this.api.asc_moveAnimationEarlier(); + } }, onMoveLater: function () { - + if(this.api) { + this.api.asc_moveAnimationLater(); + } }, onTriggerClick: function (value) { @@ -247,10 +251,11 @@ define([ }, setSettings: function () { - this._state.noGraphic = this._state.noAnimation = this._state.noAnimationParam = this._state.noTriggerObjects = true; + this._state.noGraphic = this._state.noAnimation = this._state.noAnimationParam = this._state.noTriggerObjects = this._state.noMoveAnimationLater = this._state.noMoveAnimationEarlier = true; if (this.AnimationProperties) { this._state.noGraphic = false; - + this._state.noMoveAnimationLater = !this.api.asc_canMoveAnimationLater(); + this._state.noMoveAnimationEarlier = !this.api.asc_canMoveAnimationEarlier(); var item, view = this.view, store = view.listEffects.store, @@ -396,6 +401,11 @@ define([ this.lockToolbar(PE.enumLock.noAnimationParam, this._state.noAnimationParam); if (this._state.noTriggerObjects != undefined) this.lockToolbar(PE.enumLock.noTriggerObjects, this._state.noTriggerObjects); + if (this._state.noMoveAnimationLater != undefined) + this.lockToolbar(PE.enumLock.noMoveAnimationLater, this._state.noMoveAnimationLater); + if (this._state.noMoveAnimationEarlier != undefined) + this.lockToolbar(PE.enumLock.noMoveAnimationEarlier, this._state.noMoveAnimationEarlier); + } }, PE.Controllers.Animation || {})); diff --git a/apps/presentationeditor/main/app/view/Animation.js b/apps/presentationeditor/main/app/view/Animation.js index d472cf0c8..665e09b86 100644 --- a/apps/presentationeditor/main/app/view/Animation.js +++ b/apps/presentationeditor/main/app/view/Animation.js @@ -361,7 +361,7 @@ define([ iconCls: 'toolbar__icon btn-arrow-up', style: 'min-width: 82px', caption: this.textMoveEarlier, - lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.noTriggerObjects], + lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.noTriggerObjects, _set.noMoveAnimationEarlier], dataHint: '1', dataHintDirection: 'left', dataHintOffset: 'medium' @@ -374,7 +374,7 @@ define([ iconCls: 'toolbar__icon btn-arrow-down', style: 'min-width: 82px', caption: this.textMoveLater, - lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.noTriggerObjects], + lock: [_set.slideDeleted, _set.noSlides, _set.noGraphic, _set.noAnimation, _set.noTriggerObjects, _set.noMoveAnimationLater], dataHint: '1', dataHintDirection: 'left', dataHintOffset: 'medium' diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 35ec643ae..0e251b9ce 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -88,7 +88,9 @@ define([ noGraphic: 'no-graphic', noAnimation: 'no-animation', noAnimationParam: 'no-animation-params', - noTriggerObjects: 'no-trigger-objects' + noTriggerObjects: 'no-trigger-objects', + noMoveAnimationEarlier: 'no-move-animation-earlier', + noMoveAnimationLater: 'no-move-animation-later', }; PE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend((function(){