Permalink
Browse files

Fixed bug in function startAnimation()

Bug preventing the animation to run in startAnimation()
Changed: lastAdvance = +new Date(); 
to:      lastAdvance = 0;
  • Loading branch information...
1 parent a1a7278 commit b5b703a9e9ea59b08bf3dd1561a008726edf9902 @HakonD HakonD committed Oct 30, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 ch06/example-6.7/example.js
@@ -73,7 +73,7 @@ function pauseAnimation() {
function startAnimation() {
animateButton.value = 'Pause';
paused = false;
- lastAdvance = +new Date();
+ lastAdvance = 0;
window.requestNextAnimationFrame(animate);
}

0 comments on commit b5b703a

Please sign in to comment.