mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Cleanup DOM nodes that would be left behind by leaflet
This commit is contained in:
parent
b8166eecf0
commit
8025522292
1 changed files with 4 additions and 0 deletions
|
@ -480,6 +480,7 @@ define(function (require) {
|
|||
TileMap.prototype.bindPopup = function (feature, layer) {
|
||||
var props = feature.properties;
|
||||
var popup = L.popup({
|
||||
className: 'leaflet-popup-kibana',
|
||||
autoPan: false
|
||||
})
|
||||
.setContent(
|
||||
|
@ -594,6 +595,9 @@ define(function (require) {
|
|||
* @return {undefined}
|
||||
*/
|
||||
TileMap.prototype.destroy = function () {
|
||||
// Cleanup hanging DOM nodes
|
||||
$(this.chartEl).find('[class*=" leaflet"]').remove();
|
||||
|
||||
this.maps.forEach(function (map) {
|
||||
map.remove();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue