|
@@ -120,7 +120,6 @@ var PDFViewerApplication = {
|
|
|
secondaryToolbar: null,
|
|
|
eventBus: null,
|
|
|
l10n: null,
|
|
|
- pageRotation: 0,
|
|
|
isInitialViewSet: false,
|
|
|
downloadComplete: false,
|
|
|
viewerPrefs: {
|
|
@@ -360,6 +359,9 @@ var PDFViewerApplication = {
|
|
|
get pagesCount() {
|
|
|
return this.pdfDocument ? this.pdfDocument.numPages : 0;
|
|
|
},
|
|
|
+ get pageRotation() {
|
|
|
+ return this.pdfViewer.pagesRotation;
|
|
|
+ },
|
|
|
set page(val) {
|
|
|
this.pdfViewer.currentPageNumber = val;
|
|
|
},
|
|
@@ -438,7 +440,6 @@ var PDFViewerApplication = {
|
|
|
this.pdfDocumentProperties.setDocument(null, null);
|
|
|
}
|
|
|
this.store = null;
|
|
|
- this.pageRotation = 0;
|
|
|
this.isInitialViewSet = false;
|
|
|
this.downloadComplete = false;
|
|
|
this.pdfSidebar.reset();
|
|
@@ -873,12 +874,15 @@ var PDFViewerApplication = {
|
|
|
if (!this.pdfDocument) {
|
|
|
return;
|
|
|
}
|
|
|
- var pageNumber = this.page;
|
|
|
- this.pageRotation = (this.pageRotation + 360 + delta) % 360;
|
|
|
- this.pdfViewer.pagesRotation = this.pageRotation;
|
|
|
- this.pdfThumbnailViewer.pagesRotation = this.pageRotation;
|
|
|
+ var pdfViewer = this.pdfViewer,
|
|
|
+ pdfThumbnailViewer = this.pdfThumbnailViewer;
|
|
|
+
|
|
|
+ var pageNumber = pdfViewer.currentPageNumber;
|
|
|
+ var newRotation = (pdfViewer.pagesRotation + 360 + delta) % 360;
|
|
|
+ pdfViewer.pagesRotation = newRotation;
|
|
|
+ pdfThumbnailViewer.pagesRotation = newRotation;
|
|
|
this.forceRendering();
|
|
|
- this.pdfViewer.currentPageNumber = pageNumber;
|
|
|
+ pdfViewer.currentPageNumber = pageNumber;
|
|
|
},
|
|
|
|
|
|
requestPresentationMode: function pdfViewRequestPresentationMode() {
|