loleaflet: Resurrect loleaflet permission model for readonly mode

Remove direct usage of editlock; instead change loleaflet
permission from view to edit when editlock message is received.
By default, map would be in 'view' mode and only get to 'edit'
when server asks it to switch to.

Use a new event 'doclayerinit' for actions that are directly
dependent on intialization of doclayer.

Change-Id: Iaceb95ad85721ddcd675c75cfeb1504ab2759ad4
This commit is contained in:
Pranav Kant
2016-06-24 22:03:47 +05:30
parent 29f2f3ec54
commit 454999fa57
12 changed files with 77 additions and 97 deletions

View File

@ -60,7 +60,7 @@ L.Control.ContextMenu = L.Control.extend({
},
_onContextMenu: function(obj) {
if (!map._editlock) {
if (map._permission !== 'edit') {
return;
}