]> git.parisson.com Git - pdf.js.git/commitdiff
Replace clearTimeout by clearInterval, otherwise we could end up drawing the page...
authorVivien Nicolas <21@vingtetun.org>
Fri, 17 Jun 2011 21:39:17 +0000 (23:39 +0200)
committerVivien Nicolas <21@vingtetun.org>
Fri, 17 Jun 2011 21:39:17 +0000 (23:39 +0200)
test.js

diff --git a/test.js b/test.js
index 59d8167a284070c3727fefbe8f5c4273ff2b317a..a8e7ae6e128f34772d26fc5eda121a731d63beec 100644 (file)
--- a/test.js
+++ b/test.js
@@ -50,8 +50,7 @@ function gotoPage(num) {
 }
 
 function displayPage(num) {
-    if (pageNum != num)
-      window.clearTimeout(pageInterval);
+    window.clearInterval(pageInterval);
 
     document.getElementById("pageNumber").value = num;
 
@@ -94,7 +93,7 @@ function displayPage(num) {
         if (Fonts[font.name].loading)
           return;
       }
-      clearInterval(pageInterval);
+      window.clearInterval(pageInterval);
 
       var t3 = Date.now();