mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Move the workerSrc
option from the global PDFJS
object and into GlobalWorkerOptions
instead
This commit is contained in:
parent
45adf33187
commit
c3c1fc511d
20 changed files with 69 additions and 60 deletions
10
web/app.js
10
web/app.js
|
@ -21,9 +21,9 @@ import {
|
|||
ProgressBar, RendererType, TextLayerMode
|
||||
} from './ui_utils';
|
||||
import {
|
||||
build, createBlob, getDocument, getFilenameFromUrl, InvalidPDFException,
|
||||
LinkTarget, MissingPDFException, OPS, PDFJS, PDFWorker, shadow,
|
||||
UnexpectedResponseException, UNSUPPORTED_FEATURES, version
|
||||
build, createBlob, getDocument, getFilenameFromUrl, GlobalWorkerOptions,
|
||||
InvalidPDFException, LinkTarget, MissingPDFException, OPS, PDFJS, PDFWorker,
|
||||
shadow, UnexpectedResponseException, UNSUPPORTED_FEATURES, version
|
||||
} from 'pdfjs-lib';
|
||||
import { CursorTool, PDFCursorTools } from './pdf_cursor_tools';
|
||||
import { PDFRenderingQueue, RenderingStates } from './pdf_rendering_queue';
|
||||
|
@ -54,11 +54,11 @@ function configure(PDFJS) {
|
|||
PDFJS.imageResourcesPath = './images/';
|
||||
if (typeof PDFJSDev !== 'undefined' &&
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL || GENERIC || CHROME')) {
|
||||
PDFJS.workerSrc = '../build/pdf.worker.js';
|
||||
GlobalWorkerOptions.workerSrc = '../build/pdf.worker.js';
|
||||
}
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
||||
PDFJS.cMapUrl = '../external/bcmaps/';
|
||||
PDFJS.workerSrc = '../src/worker_loader.js';
|
||||
GlobalWorkerOptions.workerSrc = '../src/worker_loader.js';
|
||||
} else {
|
||||
PDFJS.cMapUrl = '../web/cmaps/';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue