(tooltipModel: Model<TooltipOption>, nearPointColor: ZRColor)
| 402 | } |
| 403 | |
| 404 | show(tooltipModel: Model<TooltipOption>, nearPointColor: ZRColor) { |
| 405 | clearTimeout(this._hideTimeout); |
| 406 | clearTimeout(this._longHideTimeout); |
| 407 | const el = this.el; |
| 408 | const style = el.style; |
| 409 | const styleCoord = this._styleCoord; |
| 410 | if (!el.innerHTML) { |
| 411 | style.display = 'none'; |
| 412 | } |
| 413 | else { |
| 414 | style.cssText = gCssText |
| 415 | + assembleCssText(tooltipModel, !this._firstShow, this._longHide, this._enableDisplayTransition) |
| 416 | // initial transform |
| 417 | + assembleTransform(styleCoord[0], styleCoord[1], true) |
| 418 | + `border-color:${convertToColorString(nearPointColor)};` |
| 419 | + (tooltipModel.get('extraCssText') || '') |
| 420 | // If mouse occasionally move over the tooltip, a mouseout event will be |
| 421 | // triggered by canvas, and cause some unexpectable result like dragging |
| 422 | // stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve |
| 423 | // it. Although it is not supported by IE8~IE10, fortunately it is a rare |
| 424 | // scenario. |
| 425 | + `;pointer-events:${this._enterable ? 'auto' : 'none'}`; |
| 426 | } |
| 427 | |
| 428 | this._show = true; |
| 429 | this._firstShow = false; |
| 430 | this._longHide = false; |
| 431 | } |
| 432 | |
| 433 | setContent( |
| 434 | content: string | HTMLElement | HTMLElement[], |
no test coverage detected