Page 1 of 1

Chained animations are discarded when a layer is hidden

Posted: 14 Oct 2019, 00:25
by Dommy
This is a small bug, but a quite annoying one: if an animation is queued, it is permanently discarded if the layer is hidden before it gets to be played. In other words:
  1. Use AnimChain to queue an animation of an element.
  2. Hide the layer before the queued animation is supposed to play (here: show rankings).
  3. Show the layer again, after the animation is supposed to be done (here: close rankings).
Demo:


  1. Animation is instantly played once I become a cop (drive into the blue zone), the number label grows and turns red.
  2. I open rankings right before the moment my (queued) animation is supposed to play. This hides all UI layers below, including the animated label.
  3. After a while, I close the rankings, revealing the UI layers again. Animation doesn't play, the label is stuck at being big and red instead of returning to small and white.
While playing the animations with parent layer invisible is not an efficient, nor smart move, pausing the queue timer and resuming it after the layer is shown again could be the solution.

Re: Chained animations are discarded when a layer is hidden

Posted: 17 Oct 2019, 08:58
by noyranea
Hi Dommy !

This issue has been reproduced and fixed. It would occur only if the pending animation was fully skipped (hiding before start, showing after the end) due to the hiding.

By the way, you can note that the current behavior is that we do not update anims when the layer is hidden, and we catch up for the lost time when it gets visible again.

The fix will be in the next version.

Have a nice day,

-- noyranea

Re: Chained animations are discarded when a layer is hidden

Posted: 17 Oct 2019, 18:45
by Dommy
That's really good to hear, skipped animations bothered me for a while. Thanks for the fix!