]> git.parisson.com Git - pdf.js.git/commitdiff
fix for the issue:https://github.com/andreasgal/pdf.js/issues/360
authormohansun <mchinnappan@gmail.com>
Wed, 24 Aug 2011 00:46:11 +0000 (21:46 -0300)
committermohansun <mchinnappan@gmail.com>
Wed, 24 Aug 2011 00:46:11 +0000 (21:46 -0300)
web/viewer.js

index f0ecd4667e38fa1f664bed0dbfa1517572ec8473..698b8974d5404204146987129e7604b736d77feb 100644 (file)
@@ -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);