loleaflet: now the 'search' event has a 'highlightAll' property

Change-Id: I2fffe54d1474d4dea3fd2d69f5cadc8ff7a0f459
This commit is contained in:
Marco Cecchetti 2016-02-05 17:47:43 +01:00
parent 8145ac71af
commit 2a95b7dea3

View file

@ -519,6 +519,7 @@ L.TileLayer = L.GridLayer.extend({
var obj = JSON.parse(textMsg);
var originalPhrase = obj.searchString;
var count = obj.searchResultSelection.length;
var highlightAll = obj.highlightAll;
var results = [];
for (var i = 0; i < obj.searchResultSelection.length; i++) {
results.push({
@ -536,7 +537,7 @@ L.TileLayer = L.GridLayer.extend({
this._map.setPart(results[0].part); // go to first result.
}
this._searchTerm = originalPhrase;
this._map.fire('search', {originalPhrase: originalPhrase, count: count, results: results});
this._map.fire('search', {originalPhrase: originalPhrase, count: count, highlightAll: highlightAll, results: results});
},
_clearSearchResults: function() {