Merge pull request #10963 from Snuffleupagus/app-zoomIn-zoomOut-presentationMode

Ensure that `PDFViewerApplication.{zoomIn, zoomOut}` won't run when PesentationMode is active (PR 10652 follow-up)
This commit is contained in:
Tim van der Meij 2019-07-11 23:09:23 +02:00 committed by GitHub
commit 478f05650c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,9 @@ let PDFViewerApplication = {
},
zoomIn(ticks) {
if (this.pdfViewer.isInPresentationMode) {
return;
}
let newScale = this.pdfViewer.currentScale;
do {
newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);
@ -422,6 +425,9 @@ let PDFViewerApplication = {
},
zoomOut(ticks) {
if (this.pdfViewer.isInPresentationMode) {
return;
}
let newScale = this.pdfViewer.currentScale;
do {
newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);