mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Change PDFPrintServiceFactory.createPrintService
to take a parameter object
By "modernizing" the method to use a parameter object instead, we avoid having to pass along the needed parameters individually.
This commit is contained in:
parent
14874e50b7
commit
a204f434f3
3 changed files with 19 additions and 55 deletions
|
@ -114,14 +114,14 @@ function composePage(
|
|||
}
|
||||
|
||||
class FirefoxPrintService {
|
||||
constructor(
|
||||
constructor({
|
||||
pdfDocument,
|
||||
pagesOverview,
|
||||
printContainer,
|
||||
printResolution,
|
||||
optionalContentConfigPromise = null,
|
||||
printAnnotationStoragePromise = null
|
||||
) {
|
||||
printAnnotationStoragePromise = null,
|
||||
}) {
|
||||
this.pdfDocument = pdfDocument;
|
||||
this.pagesOverview = pagesOverview;
|
||||
this.printContainer = printContainer;
|
||||
|
@ -202,22 +202,8 @@ class PDFPrintServiceFactory {
|
|||
return shadow(this, "supportsPrinting", "mozPrintCallback" in canvas);
|
||||
}
|
||||
|
||||
static createPrintService(
|
||||
pdfDocument,
|
||||
pagesOverview,
|
||||
printContainer,
|
||||
printResolution,
|
||||
optionalContentConfigPromise,
|
||||
printAnnotationStoragePromise
|
||||
) {
|
||||
return new FirefoxPrintService(
|
||||
pdfDocument,
|
||||
pagesOverview,
|
||||
printContainer,
|
||||
printResolution,
|
||||
optionalContentConfigPromise,
|
||||
printAnnotationStoragePromise
|
||||
);
|
||||
static createPrintService(params) {
|
||||
return new FirefoxPrintService(params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue