From 207f4b5fc9ba1cefb5bace54884e21161813087c Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Thu, 5 May 2016 12:33:02 +0530 Subject: [PATCH] loleaflet: Emit 'editlock' only if changed Change-Id: I0d08241b82ad105902ad6ca03f015efd0eb9fb2e --- loleaflet/src/layer/tile/TileLayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 1b00baae7..b5d0ecbc7 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -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});