1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #9099 from tiriana/allow-dontFlip-in-PDFPageProxy-getViewport

Allows 'dontFlip' as third arg in PDFPageProxy.getViewport
This commit is contained in:
Jonas Jenwald 2018-01-09 18:27:26 +01:00 committed by GitHub
commit 915e3f4c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View file

@ -781,14 +781,12 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
* @param {number} scale The desired scale of the viewport.
* @param {number} rotate Degrees to rotate the viewport. If omitted this
* defaults to the page rotation.
* @param {boolean} dontFlip (optional) If true, axis Y will not be flipped.
* @return {PageViewport} Contains 'width' and 'height' properties
* along with transforms required for rendering.
*/
getViewport: function PDFPageProxy_getViewport(scale, rotate) {
if (arguments.length < 2) {
rotate = this.rotate;
}
return new PageViewport(this.view, scale, rotate, 0, 0);
getViewport(scale, rotate = this.rotate, dontFlip = false) {
return new PageViewport(this.view, scale, rotate, 0, 0, dontFlip);
},
/**
* @param {GetAnnotationsParameters} params - Annotation parameters.