From 2bbdfab115278c492c87ced7b69071c5bd9fc74c Mon Sep 17 00:00:00 2001 From: zealotchen <92966734+zealotchen0@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:57:28 +0800 Subject: [PATCH] feat(react): add animation stop (#3998) * feat(react): add animation stop * feat(react): revert react verison --- packages/hippy-react/src/modules/animation.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/hippy-react/src/modules/animation.ts b/packages/hippy-react/src/modules/animation.ts index 66af92df4a4..41282ef3231 100644 --- a/packages/hippy-react/src/modules/animation.ts +++ b/packages/hippy-react/src/modules/animation.ts @@ -265,6 +265,13 @@ class Animation implements Animation { Bridge.callNative('AnimationModule', 'pauseAnimation', this.animationId); } + /** + * Stop the running animation + */ + public stop() { + Bridge.callNative('AnimationModule', 'stopAnimation', this.animationId); + } + /** * Resume execution of paused animation */