Skip to content

Commit 9ae859f

Browse files
committed
Fix initial scroll direction detection.
1 parent 2965bad commit 9ae859f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/viewer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,6 @@ var PDFView = {
912912
}
913913
if ('page' in params) {
914914
var pageNumber = (params.page | 0) || 1;
915-
this.page = pageNumber;
916915
if ('zoom' in params) {
917916
var zoomArgs = params.zoom.split(','); // scale,left,top
918917
// building destination array
@@ -928,8 +927,9 @@ var PDFView = {
928927
(zoomArgs[2] | 0), zoomArg];
929928
var currentPage = this.pages[pageNumber - 1];
930929
currentPage.scrollIntoView(dest);
931-
} else
930+
} else {
932931
this.page = params.page; // simple page
932+
}
933933
return;
934934
}
935935
} else if (/^\d+$/.test(hash)) // page number

0 commit comments

Comments
 (0)