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

Function getRichTextRect

libs/echarts/echarts.simple.js:7661–7677  ·  view source on GitHub ↗
(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate)

Source from the content-addressed store, hash-verified

7659}
7660
7661function getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {
7662 var contentBlock = parseRichText(text, {
7663 rich: rich,
7664 truncate: truncate,
7665 font: font,
7666 textAlign: textAlign,
7667 textPadding: textPadding,
7668 textLineHeight: textLineHeight
7669 });
7670 var outerWidth = contentBlock.outerWidth;
7671 var outerHeight = contentBlock.outerHeight;
7672
7673 var x = adjustTextX(0, outerWidth, textAlign);
7674 var y = adjustTextY(0, outerHeight, textVerticalAlign);
7675
7676 return new BoundingRect(x, y, outerWidth, outerHeight);
7677}
7678
7679/**
7680 * @public

Callers 1

getBoundingRectFunction · 0.70

Calls 3

parseRichTextFunction · 0.70
adjustTextXFunction · 0.70
adjustTextYFunction · 0.70

Tested by

no test coverage detected