* Update when tooltip is rendered
(tooltipModel: Model<TooltipOption>)
| 372 | * Update when tooltip is rendered |
| 373 | */ |
| 374 | update(tooltipModel: Model<TooltipOption>) { |
| 375 | // FIXME |
| 376 | // Move this logic to ec main? |
| 377 | if (!this._container) { |
| 378 | const container = this._api.getDom(); |
| 379 | const position = getComputedStyle(container, 'position'); |
| 380 | const domStyle = container.style; |
| 381 | if (domStyle.position !== 'absolute' && position !== 'absolute') { |
| 382 | domStyle.position = 'relative'; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | // move tooltip if chart resized |
| 387 | const alwaysShowContent = tooltipModel.get('alwaysShowContent'); |
| 388 | alwaysShowContent && this._moveIfResized(); |
| 389 | |
| 390 | // update alwaysShowContent |
| 391 | this._alwaysShowContent = alwaysShowContent; |
| 392 | |
| 393 | this._enableDisplayTransition = tooltipModel.get('displayTransition') |
| 394 | && tooltipModel.get('transitionDuration') > 0; |
| 395 | |
| 396 | // update className |
| 397 | this.el.className = tooltipModel.get('className') || ''; |
| 398 | |
| 399 | // Hide the tooltip |
| 400 | // PENDING |
| 401 | // this.hide(); |
| 402 | } |
| 403 | |
| 404 | show(tooltipModel: Model<TooltipOption>, nearPointColor: ZRColor) { |
| 405 | clearTimeout(this._hideTimeout); |
nothing calls this directly
no test coverage detected