()
| 238 | } |
| 239 | |
| 240 | private _keepShow() { |
| 241 | const tooltipModel = this._tooltipModel; |
| 242 | const ecModel = this._ecModel; |
| 243 | const api = this._api; |
| 244 | const triggerOn = tooltipModel.get('triggerOn'); |
| 245 | |
| 246 | if (tooltipModel.get('trigger') !== 'axis') { |
| 247 | // _lastDataByCoordSys and _cbParamsList are used for axis tooltip only. |
| 248 | this._lastDataByCoordSys = null; |
| 249 | this._cbParamsList = null; |
| 250 | } |
| 251 | |
| 252 | // Try to keep the tooltip show when refreshing |
| 253 | if (this._lastX != null |
| 254 | && this._lastY != null |
| 255 | // When user is willing to control tooltip totally using API, |
| 256 | // self.manuallyShowTip({x, y}) might cause tooltip hide, |
| 257 | // which is not expected. |
| 258 | && triggerOn !== 'none' |
| 259 | && triggerOn !== 'click' |
| 260 | ) { |
| 261 | const self = this; |
| 262 | clearTimeout(this._refreshUpdateTimeout); |
| 263 | this._refreshUpdateTimeout = setTimeout(function () { |
| 264 | // Show tip next tick after other charts are rendered |
| 265 | // In case highlight action has wrong result |
| 266 | // FIXME |
| 267 | !api.isDisposed() && self.manuallyShowTip(tooltipModel, ecModel, api, { |
| 268 | x: self._lastX, |
| 269 | y: self._lastY, |
| 270 | dataByCoordSys: self._lastDataByCoordSys |
| 271 | }); |
| 272 | }) as any; |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * Show tip manually by |
no test coverage detected