1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
.. default-domain:: js
.. highlight:: javascript
LinkDestination
===============
A link destination points to a location within a document and how a document viewer should show that destination.
.. class:: LinkDestination(chapter, page, type, x, y, width, height)
:param number chapter:
:param number page:
:param "Fit" | "FitB" | "FitH" | "FitBH" | "FitV" | "FitBV" | "FitR" | "XYZ" type:
Constants
---------
The possible type values:
.. data:: LinkDestination.FIT
Display the page with contents zoomed to make the entire page visible.
.. data:: LinkDestination.FIT_H
Scroll to the top coordinate and zoom to make the page width visible.
.. data:: LinkDestination.FIT_V
Scroll to the left coordinate and zoom to make the page height visible.
.. data:: LinkDestination.FIT_B
Zoom to fit the page bounding box.
.. data:: LinkDestination.FIT_BH
Zoom to fit the page bounding box width.
.. data:: LinkDestination.FIT_BV
Zoom to fit the page bounding box height.
.. data:: LinkDestination.FIT_R
Scroll and zoom to make the specified rectangle visible.
.. data:: LinkDestination.XYZ
Display with coordinates at the top left zoomed in to the specified magnification factor.
Instance properties
-------------------
.. attribute:: LinkDestination.prototype.chapter
The chapter within the document.
.. attribute:: LinkDestination.prototype.page
The page within the document.
.. attribute:: LinkDestination.prototype.type
Either "Fit", "FitB", "FitH", "FitBH", "FitV", "FitBV", "FitR" or "XYZ".
The type controls which of the x, y, width, height, and zoom values are used.
.. attribute:: LinkDestination.prototype.x
The left coordinate. Used for "FitV", "FitBV", "FitR", and "XYZ".
.. attribute:: LinkDestination.prototype.y
The top coordinate. Used for "FitH", "FitBH", "FitR", and "XYZ".
.. attribute:: LinkDestination.prototype.width
The width of the zoomed in region. Used for "FitR".
.. attribute:: LinkDestination.prototype.height
The height of the zoomed in region. Used for "FitR".
.. attribute:: LinkDestination.prototype.zoom
The zoom factor. Used for "XYZ".
|