Skip to content

Commit

Permalink
dispose tooltip dom when component or chart disposed
Browse files Browse the repository at this point in the history
  • Loading branch information
xinpureZhu committed Mar 29, 2018
1 parent d9a446c commit 440781b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/component/tooltip/TooltipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ TooltipContent.prototype = {

isShow: function () {
return this._show;
}
},

dispose: function () {
this.el.parentNode.removeChild(this.el)
},
};

export default TooltipContent;
2 changes: 1 addition & 1 deletion src/component/tooltip/TooltipView.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ export default echarts.extendComponentView({
if (env.node || env.wxa) {
return;
}
this._tooltipContent.hide();
this._tooltipContent.dispose();
globalListener.unregister('itemTooltip', api);
}
});
Expand Down

0 comments on commit 440781b

Please sign in to comment.