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

Function getPlainTextRect

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

Source from the content-addressed store, hash-verified

7642}
7643
7644function getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) {
7645 var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate);
7646 var outerWidth = getWidth(text, font);
7647 if (textPadding) {
7648 outerWidth += textPadding[1] + textPadding[3];
7649 }
7650 var outerHeight = contentBlock.outerHeight;
7651
7652 var x = adjustTextX(0, outerWidth, textAlign);
7653 var y = adjustTextY(0, outerHeight, textVerticalAlign);
7654
7655 var rect = new BoundingRect(x, y, outerWidth, outerHeight);
7656 rect.lineHeight = contentBlock.lineHeight;
7657
7658 return rect;
7659}
7660
7661function getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {
7662 var contentBlock = parseRichText(text, {

Callers 1

getBoundingRectFunction · 0.70

Calls 4

parsePlainTextFunction · 0.70
getWidthFunction · 0.70
adjustTextXFunction · 0.70
adjustTextYFunction · 0.70

Tested by

no test coverage detected