[Libreoffice-commits] online.git: loleaflet/README loleaflet/reference.html loleaflet/src
Tor Lillqvist
tml at collabora.com
Thu Oct 6 12:53:21 UTC 2016
loleaflet/README | 4 ----
loleaflet/reference.html | 21 ---------------------
loleaflet/src/layer/tile/TileLayer.js | 3 ---
3 files changed, 28 deletions(-)
New commits:
commit c99379d67fb8b2dc596eb8c808c844bd1fe5c646
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Oct 6 15:42:40 2016 +0300
The 'invalidatepreview' event handling seems to be unimplemented
No need to fire it if nothing happens. Just confuses a reader of the
code.
I don't really understand JavsScript events etc, so if I have
misunderstood something, feel free to revert.
diff --git a/loleaflet/README b/loleaflet/README
index 8d5342d..9a01968 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -199,8 +199,6 @@ Parts (like slides in presentation, or sheets in spreadsheets):
+ e.parts == the number of parts that the document has
+ e.docType == 'text' | 'spreadsheet' | 'presentation' | 'drawing' | 'other'
+ [e.partNames] if present, part names (e.g. sheet names)
- map.on('invalidatepreview', function (e) {})
- + e.id = the preview's id
map.on('tilepreview', function (e) {}) where:
+ e.tile - the preview image
+ e.id - the preview id
@@ -290,8 +288,6 @@ Writer pages:
+ e.currentPage = the page on which the cursor lies
+ e.pages = number of pages
+ e.docType = document type, should be 'text'
- map.on('invalidatepreview', function (e) {})
- + e.id = the preview's id
map.on('partpagerectangles', function (e) {}) where:
+ e.pixelRectangles = An array of bounds representing each page's dimension in pixels on the current zoom level
+ e.twipsRectangles = An array of bounds representing each page's dimension in twips.
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index c22c25a..ae31f6b 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -1906,11 +1906,6 @@ unexpected behaviour.</h4>
<td>Fired when the user clicks a hyperlink in the document.</td>
</tr>
<tr>
- <td><code><b>invalidatepreview</b></code></td>
- <td><code><a href="#invalidatepreview-event">InvalidatePreviewEvent</a></code></td>
- <td>Fired when a preview needs to be invalidated.</td>
- </tr>
- <tr>
<td><code><b>pagenumberchanged</b></code></td>
<td><code><a href="#pagenumberchanged-event">PageNumberChangedEvent</a></code></td>
<td>Fired when the number of pages changes.</td>
@@ -2154,22 +2149,6 @@ The <code>id</code> property of ErrorEvent can have the following values:
</tr>
</table>
-<h3 id="invalidatepreview-event">InvalidatePreviewEvent</h3>
-<p>LOLeaflet specific events.</p>
-
-<table data-id='events'>
- <tr>
- <th class="width100">property</th>
- <th>type</th>
- <th>description</th>
- </tr>
- <tr>
- <td><code><b>id</b></code></td>
- <td><code>Object</code></td>
- <td>Preview's id that needs to be invalidated.</td>
- </tr>
-</table>
-
<h3 id="pagenumberchanged-event">PageNumberChangedEvent</h3>
<table data-id='events'>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 62ee1a9..e95684b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1749,9 +1749,6 @@ L.TileLayer = L.GridLayer.extend({
preview.tilePosY, preview.tileWidth, preview.tileHeight, {autoUpdate: true});
}
}
- else {
- this._map.fire('invalidatepreview', {id: preview.id});
- }
}
}
this._previewInvalidations = [];
More information about the Libreoffice-commits
mailing list