mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Update the signature of the PageViewport
constructor, and improve the JSDoc comments for the class
This changes the constructor to take a parameter object, rather than a string of parameters.
This commit is contained in:
parent
51673dbc5a
commit
69f2a77543
2 changed files with 56 additions and 30 deletions
|
@ -885,7 +885,12 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
|||
* along with transforms required for rendering.
|
||||
*/
|
||||
getViewport(scale, rotate = this.rotate, dontFlip = false) {
|
||||
return new PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
|
||||
return new PageViewport({
|
||||
viewBox: this.view,
|
||||
scale,
|
||||
rotation: rotate,
|
||||
dontFlip,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* @param {GetAnnotationsParameters} params - Annotation parameters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue