Merge pull request #8535 from Snuffleupagus/app-close-pageRotation-downloadComplete
Reset `pageRotation` and `downloadComplete` in `PDFViewerApplication.close`
This commit is contained in:
commit
8e9b4b5ff2
14
web/app.js
14
web/app.js
@ -136,6 +136,7 @@ var PDFViewerApplication = {
|
||||
l10n: null,
|
||||
pageRotation: 0,
|
||||
isInitialViewSet: false,
|
||||
downloadComplete: false,
|
||||
viewerPrefs: {
|
||||
sidebarViewOnLoad: SidebarView.NONE,
|
||||
pdfBugEnabled: false,
|
||||
@ -600,7 +601,9 @@ var PDFViewerApplication = {
|
||||
this.pdfDocumentProperties.setDocument(null, null);
|
||||
}
|
||||
this.store = null;
|
||||
this.pageRotation = 0;
|
||||
this.isInitialViewSet = false;
|
||||
this.downloadComplete = false;
|
||||
|
||||
this.pdfSidebar.reset();
|
||||
this.pdfOutlineViewer.reset();
|
||||
@ -670,8 +673,6 @@ var PDFViewerApplication = {
|
||||
}
|
||||
}
|
||||
|
||||
this.downloadComplete = false;
|
||||
|
||||
let loadingTask = getDocument(parameters);
|
||||
this.pdfLoadingTask = loadingTask;
|
||||
|
||||
@ -912,8 +913,6 @@ var PDFViewerApplication = {
|
||||
let pagesPromise = pdfViewer.pagesPromise;
|
||||
let onePageRendered = pdfViewer.onePageRendered;
|
||||
|
||||
this.pageRotation = 0;
|
||||
|
||||
let pdfThumbnailViewer = this.pdfThumbnailViewer;
|
||||
pdfThumbnailViewer.setDocument(pdfDocument);
|
||||
|
||||
@ -1242,8 +1241,11 @@ var PDFViewerApplication = {
|
||||
this.forceRendering();
|
||||
},
|
||||
|
||||
rotatePages: function pdfViewRotatePages(delta) {
|
||||
var pageNumber = this.page;
|
||||
rotatePages(delta) {
|
||||
if (!this.pdfDocument) {
|
||||
return;
|
||||
}
|
||||
let pageNumber = this.page;
|
||||
this.pageRotation = (this.pageRotation + 360 + delta) % 360;
|
||||
this.pdfViewer.pagesRotation = this.pageRotation;
|
||||
this.pdfThumbnailViewer.pagesRotation = this.pageRotation;
|
||||
|
Loading…
Reference in New Issue
Block a user