mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Closing memory leak
This commit is contained in:
parent
bb79d69a53
commit
30de693d84
1 changed files with 3 additions and 3 deletions
|
@ -65,9 +65,9 @@ class FlotChart extends Component {
|
|||
|
||||
shutdownChart() {
|
||||
if (!this.plot) return;
|
||||
$(this.target).unbind('plothover', this.props.plothover);
|
||||
if (this.props.onMouseOver) $(this.target).on('plothover', this.handleMouseOver);
|
||||
if (this.props.onMouseLeave) $(this.target).on('mouseleave', this.handleMouseLeave);
|
||||
$(this.target).off('plothover', this.props.plothover);
|
||||
if (this.props.onMouseOver) $(this.target).off('plothover', this.handleMouseOver);
|
||||
if (this.props.onMouseLeave) $(this.target).off('mouseleave', this.handleMouseLeave);
|
||||
if (this.props.onBrush) $(this.target).off('plotselected', this.brushChart);
|
||||
this.plot.shutdown();
|
||||
if (this.props.crosshair) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue