Update the Leaflet.contextmenu plugin to 1.5.0

This commit is contained in:
Tom Hughes 2018-01-15 10:25:21 +00:00
parent 15b2a88a2d
commit e35867dd7a
2 changed files with 11 additions and 5 deletions

View file

@ -144,16 +144,22 @@ L.Map.ContextMenu = L.Handler.extend({
contextmenu: this,
el: item
});
return item;
}
return null;
},
removeAllItems: function () {
var item;
var items = this._container.children,
item;
while (this._container.children.length) {
item = this._container.children[0];
while (items.length) {
item = items[0];
this._removeItem(L.Util.stamp(item));
}
return items;
},
hideAllItems: function () {
@ -322,7 +328,7 @@ L.Map.ContextMenu = L.Handler.extend({
func.call(context || map, me._showLocation);
}
me._map.fire('contextmenu:select', {
me._map.fire('contextmenu.select', {
contextmenu: me,
el: el
});