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:
Jonas Jenwald 2018-06-04 12:37:00 +02:00
parent 51673dbc5a
commit 69f2a77543
2 changed files with 56 additions and 30 deletions

View file

@ -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.