mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #3535 from Snuffleupagus/issue-3534
Fix issue with initial scale when opening a new file and another one is already loaded
This commit is contained in:
commit
7435b267f9
1 changed files with 5 additions and 0 deletions
|
@ -1047,6 +1047,11 @@ var PDFView = {
|
|||
// updated if the zoom level stayed the same.
|
||||
this.currentScale = 0;
|
||||
this.currentScaleValue = null;
|
||||
// When opening a new file (when one is already loaded in the viewer):
|
||||
// Reset 'currentPageNumber', since otherwise the page's scale will be wrong
|
||||
// if 'currentPageNumber' is larger than the number of pages in the file.
|
||||
document.getElementById('pageNumber').value = currentPageNumber = 1;
|
||||
|
||||
if (PDFHistory.initialDestination) {
|
||||
this.navigateTo(PDFHistory.initialDestination);
|
||||
PDFHistory.initialDestination = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue