[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - loleaflet/src

Jan Holesovsky kendy at collabora.com
Thu Feb 11 10:20:15 UTC 2016


 loleaflet/src/map/Map.js |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 4911d08854c6023782cdf27e61dacb6e2071d40b
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Feb 11 11:18:06 2016 +0100

    loleaflet: Init the handlers necessary for initializationcomplete first.

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 3819328..9cdb3cc 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -71,9 +71,6 @@ L.Map = L.Evented.extend({
 		this._addLayers(this.options.layers);
 		this._socket = L.socket(this);
 
-		// when editing, we need the LOK session right away
-		this.setPermission(options.permission);
-
 		// Inhibit the context menu - the browser thinks that the document
 		// is just a bunch of images, hence the context menu is useless (tdf#94599)
 		this.on('contextmenu', function() {});
@@ -105,6 +102,11 @@ L.Map = L.Evented.extend({
 				this._fireInitComplete('CharFontName');
 			}
 		});
+
+		// when editing, we need the LOK session right away
+		if (options.permission === 'edit') {
+			this.setPermission(options.permission);
+		}
 	},
 
 


More information about the Libreoffice-commits mailing list