loleaflet/src/map/Map.js |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 59f6df54261214f69efe47b54dd244020f2b3ba6
Author: Tor Lillqvist <t...@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
    (cherry picked from commit f7f07f50bb77f2c881511e3a61f0e9ce3c9bbe33)
    Reviewed-on: https://gerrit.libreoffice.org/52103
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 9c58ea225..95880c6da 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.
  */
@@ -426,6 +426,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;
        },
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to