MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / renderRichText

Function renderRichText

libs/echarts/echarts-en.simple.js:8588–8602  ·  view source on GitHub ↗
(hostEl, ctx, text, style, rect, prevEl)

Source from the content-addressed store, hash-verified

8586}
8587
8588function renderRichText(hostEl, ctx, text, style, rect, prevEl) {
8589 // Do not do cache for rich text because of the complexity.
8590 // But `RectText` this will be restored, do not need to clear other cache like `Style::bind`.
8591 if (prevEl !== WILL_BE_RESTORED) {
8592 ctx.__attrCachedBy = ContextCachedBy.NONE;
8593 }
8594
8595 var contentBlock = hostEl.__textCotentBlock;
8596
8597 if (!contentBlock || hostEl.__dirtyText) {
8598 contentBlock = hostEl.__textCotentBlock = parseRichText(text, style);
8599 }
8600
8601 drawRichText(hostEl, ctx, contentBlock, style, rect);
8602}
8603
8604function drawRichText(hostEl, ctx, contentBlock, style, rect) {
8605 var contentWidth = contentBlock.width;

Callers 1

renderTextFunction · 0.70

Calls 2

parseRichTextFunction · 0.70
drawRichTextFunction · 0.70

Tested by

no test coverage detected