mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Move the zoomIn/zoomOut functionality into BaseViewer
(PR 14038 follow-up)
Given the simplicity of this functionality, we can move it from the default viewer and into the `BaseViewer` class instead. This way, it's possible to support more scripting functionality in the standalone viewer components; please see PR 14038. Please note that I purposely went with `increaseScale`/`decreaseScale`-method names, rather than using "zoom", to better match the existing `currentScale`/`currentScaleValue` getters/setters that's being used in the `BaseViewer` class.
This commit is contained in:
parent
83d3bb43f4
commit
d9f9fa4f1c
4 changed files with 39 additions and 21 deletions
|
@ -324,13 +324,13 @@ class PDFScriptingManager {
|
|||
if (isInPresentationMode) {
|
||||
return;
|
||||
}
|
||||
this._eventBus.dispatch("zoomin", { source: this });
|
||||
this._pdfViewer.increaseScale();
|
||||
break;
|
||||
case "ZoomViewOut":
|
||||
if (isInPresentationMode) {
|
||||
return;
|
||||
}
|
||||
this._eventBus.dispatch("zoomout", { source: this });
|
||||
this._pdfViewer.decreaseScale();
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue