Skip to content

Commit

Permalink
Fixed bug in function startAnimation()
Browse files Browse the repository at this point in the history
Bug preventing the animation to run in startAnimation()
Changed: lastAdvance = +new Date(); 
to:      lastAdvance = 0;
  • Loading branch information
HakonD committed Oct 30, 2013
1 parent a1a7278 commit b5b703a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch06/example-6.7/example.js
Expand Up @@ -73,7 +73,7 @@ function pauseAnimation() {
function startAnimation() {
animateButton.value = 'Pause';
paused = false;
lastAdvance = +new Date();
lastAdvance = 0;
window.requestNextAnimationFrame(animate);
}

Expand Down

0 comments on commit b5b703a

Please sign in to comment.