loleaflet: Set permission to default after reconnecting

Change-Id: I39ce187e47371785bf4a183253349bbdbea9786c
This commit is contained in:
Pranav Kant 2016-09-22 21:29:47 +05:30
parent 7c5a540e8d
commit 7db798992f
2 changed files with 1 additions and 2 deletions

View file

@ -3,7 +3,6 @@
*/
L.Map.include({
setPermission: function (perm) {
this._oldPermission = this._permission;
this._permission = perm;
if (perm === 'edit') {
this._socket.sendMessage('requestloksession');

View file

@ -103,7 +103,7 @@ L.Socket = L.Class.extend({
this._msgQueue = [];
if (reconnecting) {
this._map.setPermission(this._map._oldPermission);
this._map.setPermission(this._map.options.permission);
}
this._map._activate();