From: mohansun Date: Wed, 24 Aug 2011 00:46:11 +0000 (-0300) Subject: fix for the issue:https://github.com/andreasgal/pdf.js/issues/360 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=35cc5f9965838474c47f94d787a85915e2bead67;p=pdf.js.git fix for the issue:https://github.com/andreasgal/pdf.js/issues/360 --- diff --git a/web/viewer.js b/web/viewer.js index f0ecd46..698b897 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -27,9 +27,12 @@ var PDFView = { var cssUnits = 96.0 / 72.0; for (var i = 0; i < pages.length; i++) pages[i].update(val / 100 * cssUnits); - - // Jump the scroll position to the correct page. - document.location.hash = this.page; + + if(document.location.hash == '#' + this.page) + this.pages[this.page-1].draw(); + else + // Jump the scroll position to the correct page. + document.location.hash = this.page; var event = document.createEvent("UIEvents"); event.initUIEvent("scalechange", false, false, window, val);