mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 04:47:21 +02:00
Remove unnecessary IIFEs when setting the compatParams
This really isn't necessary, and it's just a left-over from before the code was moved into the current file. Also, spotted during rebasing, use the existing "locale" hash-parameter in integration-tests rather than adding a duplicate one for testing.
This commit is contained in:
parent
5d02076313
commit
1370950843
@ -111,7 +111,7 @@ describe("Comment", () => {
|
|||||||
".annotationEditorLayer",
|
".annotationEditorLayer",
|
||||||
"page-width",
|
"page-width",
|
||||||
null,
|
null,
|
||||||
{ enableComment: true, localeProperties: "ar" }
|
{ enableComment: true, locale: "ar" }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -387,7 +387,6 @@ const PDFViewerApplication = {
|
|||||||
forcePageColors: x => x === "true",
|
forcePageColors: x => x === "true",
|
||||||
pageColorsBackground: x => x,
|
pageColorsBackground: x => x,
|
||||||
pageColorsForeground: x => x,
|
pageColorsForeground: x => x,
|
||||||
localeProperties: x => ({ lang: x }),
|
|
||||||
sidebarViewOnLoad: x => parseInt(x),
|
sidebarViewOnLoad: x => parseInt(x),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,19 +37,15 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||||||
|
|
||||||
// Limit canvas size to 5 mega-pixels on mobile.
|
// Limit canvas size to 5 mega-pixels on mobile.
|
||||||
// Support: Android, iOS
|
// Support: Android, iOS
|
||||||
(function () {
|
if (isIOS || isAndroid) {
|
||||||
if (isIOS || isAndroid) {
|
compatParams.set("maxCanvasPixels", 5242880);
|
||||||
compatParams.set("maxCanvasPixels", 5242880);
|
}
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
// Don't use system fonts on Android (issue 18210).
|
// Don't use system fonts on Android (issue 18210).
|
||||||
// Support: Android
|
// Support: Android
|
||||||
(function () {
|
if (isAndroid) {
|
||||||
if (isAndroid) {
|
compatParams.set("useSystemFonts", false);
|
||||||
compatParams.set("useSystemFonts", false);
|
}
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const OptionKind = {
|
const OptionKind = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user