Merge pull request #362 from mohansun/patch-2

fix for the issue:https://github.com/andreasgal/pdf.js/issues/360
This commit is contained in:
vingtetun 2011-08-23 14:39:57 -07:00
commit 35aa31eb55

View File

@ -28,8 +28,11 @@ var PDFView = {
for (var i = 0; i < pages.length; i++) for (var i = 0; i < pages.length; i++)
pages[i].update(val / 100 * cssUnits); pages[i].update(val / 100 * cssUnits);
// Jump the scroll position to the correct page. if(document.location.hash == '#' + this.page)
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"); var event = document.createEvent("UIEvents");
event.initUIEvent("scalechange", false, false, window, val); event.initUIEvent("scalechange", false, false, window, val);