mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Destroy charts before the layout removes them from the DOM (#9795)
Backports PR #9728
**Commit 1:**
Destroy charts before the layout removes them from the DOM
* Original sha: e4e773c10c
* Authored by Jacob Brandt <jbrandt@dcsdk12.org> on 2017-01-04T20:55:22Z
This commit is contained in:
parent
2636d25179
commit
76c0dc891d
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,12 @@ export default function MapsFactory(Private) {
|
|||
}
|
||||
|
||||
draw() {
|
||||
// Destroy the charts before they get removed from the DOM on the new
|
||||
// layout render.
|
||||
if(this.charts !== undefined) {
|
||||
this.charts.forEach(chart => chart.destroy());
|
||||
}
|
||||
|
||||
this.layout.render();
|
||||
// todo: title
|
||||
const self = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue