[Libreoffice-commits] online.git: 2 commits - loleaflet/README loleaflet/reference.html loleaflet/src

Mihai Varga mihai.varga at collabora.com
Mon Oct 19 01:31:43 PDT 2015


 loleaflet/README                      |    4 ++++
 loleaflet/reference.html              |   22 +++++++++++++++++++++-
 loleaflet/src/layer/tile/TileLayer.js |    2 +-
 3 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 62184cffb4dfbff684a089945cf319c49a218a1d
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Mon Oct 19 11:31:20 2015 +0300

    loleaflet: documented the print event

diff --git a/loleaflet/README b/loleaflet/README
index 3158cf2..c7baa1a 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -238,6 +238,10 @@ CommandValues:
             + e.commandName = '.uno:StyleAplly', etc
             + e.commandValues = a JSON mapping of all possible values for the command
 
+Print:
+    - events
+        map.on('print', function (e) {}) where
+            + e.url = file download url
 Testing
 -------
     - to simulate an editing session and to get the tile loading times
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 9c4a2e2..07574de 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -282,7 +282,12 @@ var map = L.map('map', {
 		<td><code><span class="literal">false</span></code></td>
 		<td>Whether the document is read-only.</td>
 	</tr>
-
+	<tr>
+		<td><code><b>print</b></code></td>
+		<td><code>Boolean</code></td>
+		<td><code><span class="literal">false</span></code></td>
+		<td>Whether the print handler is active (for Chrome).</td>
+	</tr>
 	<tr>
 		<td><code><b>dragging</b></code></td>
 		<td><code>Boolean</code></td>
@@ -1700,6 +1705,21 @@ var map = L.map('map', {
 	</tr>
 </table>
 
+<h3 id="print-event">PrintEvent</h3>
+
+<table data-id='events'>
+	<tr>
+		<th class="width100">property</th>
+		<th>type</th>
+		<th>description</th>
+	</tr>
+	<tr>
+		<td><code><b>url</b></code></td>
+        <td><code>String</code></td>
+		<td>An url for the PDF exported document.</td>
+	</tr>
+</table>
+
 <h3 id="partpagerectangles-event">PartPageRectangles</h3>
 
 <table data-id='events'>
commit 05e81a0edb14c0d278b467d0dd74a09148a166ec
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Mon Oct 19 11:24:30 2015 +0300

    loleaflet: allow the disabling of the print handler

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 551e25b..eb70050 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -278,7 +278,7 @@ L.TileLayer = L.GridLayer.extend({
 
 		if (command.id === 'print') {
 			var isFirefox = typeof InstallTrigger !== 'undefined' || navigator.userAgent.search('Firefox') >= 0;
-			if (isFirefox) {
+			if (isFirefox || this._map.options.print === false) {
 				// the print dialog doesn't work well on firefox
 				this._map.fire('print', {url: url});
 			}


More information about the Libreoffice-commits mailing list