mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Simplify JpxImage.setOptions
a little bit
After PR 19392 we're only invoking this method *once* per document, hence the early-return branch shouldn't be necessary any more.
This commit is contained in:
parent
641e2f506e
commit
637e95985a
2 changed files with 1 additions and 4 deletions
|
@ -38,9 +38,6 @@ class JpxImage {
|
|||
static #wasmUrl = null;
|
||||
|
||||
static setOptions({ handler, useWasm, useWorkerFetch, wasmUrl }) {
|
||||
if (this.#buffer || this.#modulePromise) {
|
||||
return;
|
||||
}
|
||||
this.#useWasm = useWasm;
|
||||
this.#useWorkerFetch = useWorkerFetch;
|
||||
this.#wasmUrl = wasmUrl;
|
||||
|
|
|
@ -70,7 +70,7 @@ class BasePdfManager {
|
|||
FeatureTest.isImageDecoderSupported;
|
||||
this.evaluatorOptions = Object.freeze(evaluatorOptions);
|
||||
|
||||
// Initially image-options once per document.
|
||||
// Initialize image-options once per document.
|
||||
ImageResizer.setOptions(evaluatorOptions);
|
||||
JpegStream.setOptions(evaluatorOptions);
|
||||
JpxImage.setOptions({ ...evaluatorOptions, handler });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue