From 96c5fb6dc992656660c3cc5dfaf901de9103c4de Mon Sep 17 00:00:00 2001 From: lang Date: Tue, 19 Apr 2016 17:28:33 +0800 Subject: [PATCH] Fix #2988 --- src/component/tooltip/TooltipView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/component/tooltip/TooltipView.js b/src/component/tooltip/TooltipView.js index 791ac090e..f326a9e48 100644 --- a/src/component/tooltip/TooltipView.js +++ b/src/component/tooltip/TooltipView.js @@ -255,12 +255,14 @@ define(function (require) { zr.off('click', tryShow); zr.off('mousemove', tryShow); zr.off('mouseout', this._hide); + zr.off('globalout', this._hide); if (tooltipModel.get('triggerOn') === 'click') { zr.on('click', tryShow, this); } else { zr.on('mousemove', tryShow, this); zr.on('mouseout', this._hide, this); + zr.on('globalout', this._hide, this); } }, @@ -1100,6 +1102,8 @@ define(function (require) { type: 'hideTip', from: this.uid }); + + this._lastX = this._lastY = null; }, dispose: function (ecModel, api) { @@ -1112,6 +1116,7 @@ define(function (require) { zr.off('click', this._tryShow); zr.off('mousemove', this._tryShow); zr.off('mouseout', this._hide); + zr.off('globalout', this._hide); api.off('showTip', this._manuallyShowTip); api.off('hideTip', this._manuallyHideTip); -- GitLab