mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
[api-minor] Change the getViewport
method, on PDFPageProxy
, to take a parameter object rather than a bunch of (randomly) ordered parameters
If, as PR 10368 suggests, more parameters should be added to `getViewport` I think that it would be a mistake to not change the signature *first* to avoid needlessly unwieldy call-sites. To not break any existing code and third-party use-cases, this is obviously implemented with a deprecation warning *and* with a working fallback[1] for the old method signature. --- [1] This is limited to `GENERIC` builds, which should be sufficient.
This commit is contained in:
parent
ba2edeae18
commit
f0719ed565
19 changed files with 54 additions and 38 deletions
|
@ -140,11 +140,11 @@ class DOMSVGFactory {
|
|||
* @property {Array} viewBox - The xMin, yMin, xMax and yMax coordinates.
|
||||
* @property {number} scale - The scale of the viewport.
|
||||
* @property {number} rotation - The rotation, in degrees, of the viewport.
|
||||
* @property {number} offsetX - (optional) The vertical, i.e. x-axis, offset.
|
||||
* @property {number} offsetX - (optional) The horizontal, i.e. x-axis, offset.
|
||||
* The default value is `0`.
|
||||
* @property {number} offsetY - (optional) The horizontal, i.e. y-axis, offset.
|
||||
* @property {number} offsetY - (optional) The vertical, i.e. y-axis, offset.
|
||||
* The default value is `0`.
|
||||
* @property {boolean} dontFlip - (optional) If true, the x-axis will not be
|
||||
* @property {boolean} dontFlip - (optional) If true, the y-axis will not be
|
||||
* flipped. The default value is `false`.
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue