loleaflet: Emit 'editlock' only if changed

Change-Id: I0d08241b82ad105902ad6ca03f015efd0eb9fb2e
This commit is contained in:
Pranav Kant 2016-05-05 12:33:02 +05:30
parent 909c996a6d
commit 207f4b5fc9

View file

@ -1267,7 +1267,7 @@ L.TileLayer = L.GridLayer.extend({
_onEditLock: function (textMsg) {
var val = parseInt(textMsg.split(' ')[1]);
if (!isNaN(val)) {
if (!isNaN(val) && val !== this._map._editlock) {
this._map._editlock = val;
this._map.fire('editlock', {value: val});