dineshkummarc / cakejs

Automatically exported from code.google.com/p/cakejs
0 stars 0 forks source link

after(1000) can fire before after(900) #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. after(1000, function(){ console.log("1000") })
2. after(900, function(){ console.log("900") })
3. after(0, function(){ do_stuff_for_2000ms(); })

What is the expected output? 

900
1000

What do you see instead?

1000
900

This happens because the animation methods use a frame handler per
animation method call. 

Fixable by moving to a timeline minheap and popping the callbacks from it.
(I.e. have a timeline, call and remove the earliest event from the timeline
while the earliest event in the timeline <= current time.)

Original issue reported on code.google.com by Ilmari.H...@gmail.com on 15 Mar 2008 at 12:20

GoogleCodeExporter commented 8 years ago
should be fixed in r8, moved to timeline system.

Original comment by Ilmari.H...@gmail.com on 17 Mar 2008 at 1:58