|
|
@ -996,7 +996,7 @@ var PDFView = { |
|
|
|
pageViewScroll: null, |
|
|
|
pageViewScroll: null, |
|
|
|
thumbnailViewScroll: null, |
|
|
|
thumbnailViewScroll: null, |
|
|
|
isPresentationMode: false, |
|
|
|
isPresentationMode: false, |
|
|
|
previousScale: null, |
|
|
|
presentationModeArgs: null, |
|
|
|
pageRotation: 0, |
|
|
|
pageRotation: 0, |
|
|
|
mouseScrollTimeStamp: 0, |
|
|
|
mouseScrollTimeStamp: 0, |
|
|
|
mouseScrollDelta: 0, |
|
|
|
mouseScrollDelta: 0, |
|
|
@ -2190,29 +2190,29 @@ var PDFView = { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.presentationModeArgs = { |
|
|
|
|
|
|
|
page: this.page, |
|
|
|
|
|
|
|
previousScale: this.currentScaleValue |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
enterPresentationMode: function pdfViewEnterPresentationMode() { |
|
|
|
enterPresentationMode: function pdfViewEnterPresentationMode() { |
|
|
|
this.isPresentationMode = true; |
|
|
|
this.isPresentationMode = true; |
|
|
|
var currentPage = this.pages[this.page - 1]; |
|
|
|
this.page = this.presentationModeArgs.page; |
|
|
|
this.previousScale = this.currentScaleValue; |
|
|
|
|
|
|
|
this.parseScale('page-fit', true); |
|
|
|
this.parseScale('page-fit', true); |
|
|
|
|
|
|
|
|
|
|
|
// Wait for presentation mode to take effect
|
|
|
|
|
|
|
|
setTimeout(function() { |
|
|
|
|
|
|
|
currentPage.scrollIntoView(); |
|
|
|
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.showPresentationControls(); |
|
|
|
this.showPresentationControls(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
exitPresentationMode: function pdfViewExitPresentationMode() { |
|
|
|
exitPresentationMode: function pdfViewExitPresentationMode() { |
|
|
|
this.isPresentationMode = false; |
|
|
|
this.isPresentationMode = false; |
|
|
|
this.parseScale(this.previousScale); |
|
|
|
this.parseScale(this.presentationModeArgs.previousScale); |
|
|
|
this.page = this.page; |
|
|
|
this.page = this.page; |
|
|
|
this.clearMouseScrollState(); |
|
|
|
this.clearMouseScrollState(); |
|
|
|
this.hidePresentationControls(); |
|
|
|
this.hidePresentationControls(); |
|
|
|
|
|
|
|
this.presentationModeArgs = null; |
|
|
|
|
|
|
|
|
|
|
|
// Ensure that the thumbnail of the current page is visible
|
|
|
|
// Ensure that the thumbnail of the current page is visible
|
|
|
|
// when exiting presentation mode.
|
|
|
|
// when exiting presentation mode.
|
|
|
|