Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

controller.start, controller.pause, and controller.stop will act on all animations. #76

Closed
parkerziegler opened this issue Jul 14, 2020 · 0 comments · Fixed by #80
Closed
Labels
🐛 bug Something isn't working

Comments

@parkerziegler
Copy link
Contributor

controller.start, controller.pause, and controller.stop will run on all active animations, even those spurred by two disparate hooks. For example, if a view has multiple useFriction hooks running and controller.stop is called, all animations will be stopped and animation state destroyed rather than just stopping the particular animation that corresponds to that hook's instance.

This is likely a regression introduced through the use of our animatingElements Set, which doesn't group elements according to the hook that called them, but rather bins them all in a single Set 🤦 : https://github.com/FormidableLabs/renature/blob/saturn/src/animation/friction.ts#L74

To fix this, we'll likely want to create a class of some kind to act as the central orchestrator of a particular hook instance's animation state.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
1 participant