shoes4 icon indicating copy to clipboard operation
shoes4 copied to clipboard

Clearing should stop removed animations

Open jasonrclark opened this issue 11 years ago • 3 comments

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

jasonrclark avatar Nov 03 '14 21:11 jasonrclark

Made it pre3 as I think it's an easy fix and it feels kinda major to me :)

PragTob avatar Nov 04 '14 08:11 PragTob

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).

  1. This is the behavior that Shoes 3 has, where clear doesn't impact animations
  2. 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.

jasonrclark avatar Nov 10 '14 04:11 jasonrclark

SHA for a possible solution is at a9305ad (in case the branch goes away anytime before we want it for reference.)

jasonrclark avatar Nov 10 '14 04:11 jasonrclark