From: Vivien Nicolas <21@vingtetun.org> Date: Fri, 17 Jun 2011 21:39:17 +0000 (+0200) Subject: Replace clearTimeout by clearInterval, otherwise we could end up drawing the page... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=741191e372dc06d79263adacf1945d0ec3cc7cc8;p=pdf.js.git Replace clearTimeout by clearInterval, otherwise we could end up drawing the page in an infinite loop --- diff --git a/test.js b/test.js index 59d8167..a8e7ae6 100644 --- 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();