Maheshjayachandran / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

FINISH and END events never dispatched for empty animation queues #394

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Nested animation queues will stop when an empty animation queue is encountered, 
preventing any more animations in queue from running.

What steps will reproduce the problem?
1. Create an animation queue (q1)
2. Create an empty animation queue (q2) 
3. Add q2 to q1.
4. Create any animation (a1)
5. Play q1.

What is the expected output? What do you see instead?
I would expect an empty animation queue to just be silently ignored, continuing 
with the next animation in the main queue. 

What version of the product are you using? On what operating system?
r1376 (latest featured download)

Please provide any additional information below.
The reason seems to be that the events FINISH and END are not dispatched when 
an empty animation queue is played. This results in the onAnimationFinished 
function of AnimationQueue not being called for the parent animation queue, 
which in turn means any more animations will not be played.

Original issue reported on code.google.com by r.dahlen@gmail.com on 20 Nov 2011 at 12:59

GoogleCodeExporter commented 9 years ago
Patch that solved my problem. It simply calls onFinish and onEnd when an 
animation queue is empty, before returning. Implemented for both 
AnimationSerialQueue and AnimationParallelQueue.

Not sure if it this solution has any implications I have missed. 

Original comment by r.dahlen@gmail.com on 20 Nov 2011 at 1:06

Attachments:

GoogleCodeExporter commented 9 years ago
Possibly valid, but we cannot take patch without CLA signed.  See contributor 
wiki page.

This may be implemented another way.

Original comment by nn...@google.com on 11 May 2012 at 7:26