Ensure that PDFViewerApplication.{zoomIn, zoomOut}
won't run when PresentationMode is active (PR 10652 follow-up)
Similar to the `zoomReset` method we need to ensure that this code won't run for zoom events originating within the browser UI itself, since checks in e.g. the `keydown` event handler won't help in that case.
This commit is contained in:
parent
d7afb74a6e
commit
19f6facc1e
@ -412,6 +412,9 @@ let PDFViewerApplication = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
zoomIn(ticks) {
|
zoomIn(ticks) {
|
||||||
|
if (this.pdfViewer.isInPresentationMode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let newScale = this.pdfViewer.currentScale;
|
let newScale = this.pdfViewer.currentScale;
|
||||||
do {
|
do {
|
||||||
newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);
|
newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2);
|
||||||
@ -422,6 +425,9 @@ let PDFViewerApplication = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
zoomOut(ticks) {
|
zoomOut(ticks) {
|
||||||
|
if (this.pdfViewer.isInPresentationMode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let newScale = this.pdfViewer.currentScale;
|
let newScale = this.pdfViewer.currentScale;
|
||||||
do {
|
do {
|
||||||
newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);
|
newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user