mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Replace the disableTextLayer
and enhanceTextSelection
options/preferences with a single textLayerMode
option/preference
Rather than having two different (but connected) options for the textLayer, I think that it makes sense to try and unify this. For example: currently if `disableTextLayer === true`, then the value of `enhanceTextSelection` is simply ignored. Since PDF.js version `2.0` already won't be backwards compatible in lots of ways, I don't think that we need to worry about migrating existing preferences here.
This commit is contained in:
parent
3a6f6d23d6
commit
a1cfa5f4d7
7 changed files with 46 additions and 41 deletions
|
@ -22,7 +22,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.PDFViewer || !PDFJS.getDocument) {
|
|||
}
|
||||
|
||||
var USE_ONLY_CSS_ZOOM = true;
|
||||
PDFJS.disableTextLayer = true;
|
||||
var TEXT_LAYER_MODE = 0; // DISABLE
|
||||
PDFJS.maxImageSize = 1024 * 1024;
|
||||
PDFJS.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
||||
|
@ -299,6 +299,7 @@ var PDFViewerApplication = {
|
|||
linkService: linkService,
|
||||
l10n: this.l10n,
|
||||
useOnlyCssZoom: USE_ONLY_CSS_ZOOM,
|
||||
textLayerMode: TEXT_LAYER_MODE,
|
||||
});
|
||||
this.pdfViewer = pdfViewer;
|
||||
linkService.setViewer(pdfViewer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue