mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Update Prettier to version 2.0
Please note that these changes were done automatically, using `gulp lint --fix`. Given that the major version number was increased, there's a fair number of (primarily whitespace) changes; please see https://prettier.io/blog/2020/03/21/2.0.0.html In order to reduce the size of these changes somewhat, this patch maintains the old "arrowParens" style for now (once mozilla-central updates Prettier we can simply choose the same formatting, assuming it will differ here).
This commit is contained in:
parent
a4dd081d7b
commit
426945b480
145 changed files with 2005 additions and 2009 deletions
|
@ -14,9 +14,9 @@ pdfjsLib.GlobalWorkerOptions.workerSrc =
|
|||
// Loading a document.
|
||||
var loadingTask = pdfjsLib.getDocument(pdfPath);
|
||||
loadingTask.promise
|
||||
.then(function(pdfDocument) {
|
||||
.then(function (pdfDocument) {
|
||||
// Request a first page
|
||||
return pdfDocument.getPage(1).then(function(pdfPage) {
|
||||
return pdfDocument.getPage(1).then(function (pdfPage) {
|
||||
// Display page on the existing canvas with 100% scale.
|
||||
var viewport = pdfPage.getViewport({ scale: 1.0 });
|
||||
var canvas = document.getElementById("theCanvas");
|
||||
|
@ -30,6 +30,6 @@ loadingTask.promise
|
|||
return renderTask.promise;
|
||||
});
|
||||
})
|
||||
.catch(function(reason) {
|
||||
.catch(function (reason) {
|
||||
console.error("Error: " + reason);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue