mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-02-07 16:11:12 +01: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",
|
||||
"page-width",
|
||||
null,
|
||||
{ enableComment: true, localeProperties: "ar" }
|
||||
{ enableComment: true, locale: "ar" }
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -387,7 +387,6 @@ const PDFViewerApplication = {
|
||||
forcePageColors: x => x === "true",
|
||||
pageColorsBackground: x => x,
|
||||
pageColorsForeground: x => x,
|
||||
localeProperties: x => ({ lang: 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.
|
||||
// Support: Android, iOS
|
||||
(function () {
|
||||
if (isIOS || isAndroid) {
|
||||
compatParams.set("maxCanvasPixels", 5242880);
|
||||
}
|
||||
})();
|
||||
if (isIOS || isAndroid) {
|
||||
compatParams.set("maxCanvasPixels", 5242880);
|
||||
}
|
||||
|
||||
// Don't use system fonts on Android (issue 18210).
|
||||
// Support: Android
|
||||
(function () {
|
||||
if (isAndroid) {
|
||||
compatParams.set("useSystemFonts", false);
|
||||
}
|
||||
})();
|
||||
if (isAndroid) {
|
||||
compatParams.set("useSystemFonts", false);
|
||||
}
|
||||
}
|
||||
|
||||
const OptionKind = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user