From b5b703a9e9ea59b08bf3dd1561a008726edf9902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon?= Date: Wed, 30 Oct 2013 23:18:16 +0100 Subject: [PATCH] Fixed bug in function startAnimation() Bug preventing the animation to run in startAnimation() Changed: lastAdvance = +new Date(); to: lastAdvance = 0; --- ch06/example-6.7/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06/example-6.7/example.js b/ch06/example-6.7/example.js index 8c22474..79df489 100644 --- a/ch06/example-6.7/example.js +++ b/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); }