Clearing should stop removed animations
If you clear out a container that had a running animation, that should get stopped.
Sample code, which keeps running after the button push:
Shoes.app do
@a = animate do
para "something"
end
button do
clear
end
end
Made it pre3 as I think it's an easy fix and it feels kinda major to me :)
So on further reflection and review, turned up a couple things that are prompting us to move this to 4.1 (when we'll consider breaking changes).
- This is the behavior that Shoes 3 has, where clear doesn't impact animations
- Part of the reason it doesn't is that the animations don't actually live within the slots, so they don't get cleared
There's some concern that either of these changes could be a breaking change for existing apps.
I can imagine a world where we did implement this via adding animations to the slot within which they're called. This would let you control when/where animations get stopped on clear (maybe with a caveat to not stop top-level slot animations or something like that). In any case, it deserves more thought before doing anything further.
SHA for a possible solution is at a9305ad (in case the branch goes away anytime before we want it for reference.)