mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Merge pull request #16305 from Snuffleupagus/PDFJSDev-skip-PRODUCTION
Remove the `PRODUCTION` build-target
This commit is contained in:
commit
c9359957e6
31 changed files with 89 additions and 269 deletions
|
@ -165,10 +165,7 @@ class PDFPageView {
|
|||
|
||||
this.renderTask = null;
|
||||
this.resume = null;
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")
|
||||
) {
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
this._isStandalone = !this.renderingQueue?.hasViewer();
|
||||
}
|
||||
|
||||
|
@ -194,8 +191,7 @@ class PDFPageView {
|
|||
container?.append(div);
|
||||
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
this._isStandalone
|
||||
) {
|
||||
// Ensure that the various layers always get the correct initial size,
|
||||
|
@ -549,8 +545,7 @@ class PDFPageView {
|
|||
this.#setDimensions();
|
||||
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
this._isStandalone
|
||||
) {
|
||||
this.div.parentNode?.style.setProperty(
|
||||
|
@ -687,8 +682,7 @@ class PDFPageView {
|
|||
}) {
|
||||
// Scale target (canvas), its wrapper and page container.
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || TESTING")) &&
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) &&
|
||||
!(target instanceof HTMLCanvasElement)
|
||||
) {
|
||||
throw new Error("Expected `target` to be a canvas.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue