mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Merge pull request #3732 from rashidkpc/fix/tile-map-dom-leak
Cleanup Leaflet DOM nodes
This commit is contained in:
commit
fa836292fc
1 changed files with 4 additions and 0 deletions
|
@ -502,6 +502,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(
|
||||
|
@ -616,6 +617,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