From 27f94c81a2c92af1ab9bd771736959e212609ee1 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Sun, 27 Sep 2020 12:08:48 -0700
Subject: [PATCH] applied event for animation manager

---
 src/mol-plugin-state/manager/animation.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mol-plugin-state/manager/animation.ts b/src/mol-plugin-state/manager/animation.ts
index b38b4eea5..9ee6b168b 100644
--- a/src/mol-plugin-state/manager/animation.ts
+++ b/src/mol-plugin-state/manager/animation.ts
@@ -22,7 +22,8 @@ class PluginAnimationManager extends StatefulPluginComponent<PluginAnimationMana
     private _params?: PD.For<PluginAnimationManager.State['params']> = void 0;
 
     readonly events = {
-        updated: this.ev()
+        updated: this.ev(),
+        applied: this.ev(),
     };
 
     get isEmpty() { return this.animations.length === 0; }
@@ -32,6 +33,10 @@ class PluginAnimationManager extends StatefulPluginComponent<PluginAnimationMana
         this.events.updated.next();
     }
 
+    private triggerApply() {
+        this.events.applied.next();
+    }
+
     getParams(): PD.Params {
         if (!this._params) {
             this._params = {
@@ -150,6 +155,7 @@ class PluginAnimationManager extends StatefulPluginComponent<PluginAnimationMana
         } else if (newState.kind === 'skip') {
             if (this.state.animationState === 'playing') this._frame = requestAnimationFrame(this.animate);
         }
+        this.triggerApply();
     }
 
     getSnapshot(): PluginAnimationManager.Snapshot {
-- 
GitLab