[Libreoffice-commits] online.git: loleaflet/src
Tor Lillqvist
tml at collabora.com
Wed Mar 28 10:44:31 UTC 2018
loleaflet/src/map/Map.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit f7f07f50bb77f2c881511e3a61f0e9ce3c9bbe33
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Jan 18 18:48:32 2018 +0200
Check for the proof-of-concept case with no WOPI but loleaflet in an iframe
In that case we still want to run the postMessage event handling.
Change-Id: I147aa670e7833156ae7374676aaf3a1802b2906d
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 6790b1cb3..f9d397b7e 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -1,4 +1,4 @@
-/* -*- js-indent-level: 8 -*- */
+/* -*- js-indent-level: 8; fill-column: 100 -*- */
/*
* L.Map is the central class of the API - it is used to create a map.
*/
@@ -423,6 +423,13 @@ L.Map = L.Evented.extend({
handler.enable();
}
+ // Check for the special proof-of-concept case where no WOPI is involved but we
+ // still run loleaflet in an iframe of its own and thus need to receive the
+ // postMessage things.
+ if (name === 'wopi' && this.options['notWopiButIframe']) {
+ handler.addHooks();
+ }
+
return this;
},
More information about the Libreoffice-commits
mailing list