mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 06:38:07 +02:00
[api-minor] Replace the useOnlyCssZoom
option with maxCanvasPixels = 0
instead (PR 16729 follow-up)
Given that the `useOnlyCssZoom` option is essentially just a special-case of the `maxCanvasPixels` functionality, we can combine the two options in order to simplify the overall implementation. Note that the `useOnlyCssZoom` functionality was only ever used, by default, in the PDF Viewer for the B2G/FirefoxOS project (which was abandoned years ago).
This commit is contained in:
parent
cfd179f23f
commit
0ee2a352ec
5 changed files with 52 additions and 48 deletions
|
@ -20,7 +20,7 @@ if (!pdfjsLib.getDocument || !pdfjsViewer.PDFViewer) {
|
|||
alert("Please build the pdfjs-dist library using\n `gulp dist-install`");
|
||||
}
|
||||
|
||||
const USE_ONLY_CSS_ZOOM = true;
|
||||
const MAX_CANVAS_PIXELS = 0; // CSS-only zooming.
|
||||
const TEXT_LAYER_MODE = 0; // DISABLE
|
||||
const MAX_IMAGE_SIZE = 1024 * 1024;
|
||||
const CMAP_URL = "../../node_modules/pdfjs-dist/cmaps/";
|
||||
|
@ -363,7 +363,7 @@ const PDFViewerApplication = {
|
|||
eventBus,
|
||||
linkService,
|
||||
l10n: this.l10n,
|
||||
useOnlyCssZoom: USE_ONLY_CSS_ZOOM,
|
||||
maxCanvasPixels: MAX_CANVAS_PIXELS,
|
||||
textLayerMode: TEXT_LAYER_MODE,
|
||||
});
|
||||
this.pdfViewer = pdfViewer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue