loleaflet: map.getPageSizes - returns the size of each page
In twips and pixels
This commit is contained in:
parent
3ba0bd6aeb
commit
1588dd5f5d
3 changed files with 12 additions and 5 deletions
|
@ -203,6 +203,8 @@ Writer pages:
|
|||
+ options = {autoUpdate: true} - automatically updates the previews
|
||||
map.removePreviewUpdate(id)
|
||||
+ id = the preview's id
|
||||
map.getPageSizes()
|
||||
+ returns {twips: [Bounds], pixels: [Bounds]}
|
||||
|
||||
- events
|
||||
map.on('pagenumberchanged', function (e) {}) where:
|
||||
|
|
|
@ -1422,6 +1422,12 @@ var map = L.map('map', {
|
|||
<td>Returns the document type.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><b>getPageSizes</b>()</code></td>
|
||||
<td><code><nobr>{twips: <a href="#bounds">[Bounds]</a>,<br>
|
||||
pixels: <a href="#bounds">[Bounds]</a>}</nobr></code></td>
|
||||
<td>Returns an object describing the size of each page in twips and pixels.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><b>scroll</b>(
|
||||
<nobr><Number><i>x</i>,</nobr>
|
||||
<nobr><Number><i>y</i>,</nobr>
|
||||
|
|
|
@ -164,11 +164,10 @@ L.Map.include({
|
|||
return this._docLayer._docPixelSize;
|
||||
},
|
||||
|
||||
getPageSize: function (page) {
|
||||
if (this._docLayer._partPageRectanglesPixels && this._docLayer._partPageRectanglesPixels.length > page) {
|
||||
return this._docLayer._partPageRectanglesPixels[page];
|
||||
}
|
||||
return null;
|
||||
getPageSizes: function () {
|
||||
return {
|
||||
twips: this._docLayer._partPageRectanglesTwips,
|
||||
pixels: this._docLayer._partPageRectanglesPixels};
|
||||
},
|
||||
|
||||
getDocType: function () {
|
||||
|
|
Loading…
Reference in a new issue