MCPcopy
hub / github.com/apache/echarts / show

Method show

src/component/tooltip/TooltipHTMLContent.ts:404–431  ·  view source on GitHub ↗
(tooltipModel: Model<TooltipOption>, nearPointColor: ZRColor)

Source from the content-addressed store, hash-verified

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[],

Callers 5

IFunction · 0.45
jquery.min.jsFile · 0.45
ibFunction · 0.45
_showTooltipContentMethod · 0.45
renderMethod · 0.45

Calls 4

convertToColorStringFunction · 0.90
assembleCssTextFunction · 0.85
assembleTransformFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected