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

Function getBoundingRect

libs/echarts/echarts-en.simple.js:7638–7642  ·  view source on GitHub ↗

* @public * @param {string} text * @param {string} font * @param {string} [textAlign='left'] * @param {string} [textVerticalAlign='top'] * @param {Array. } [textPadding] * @param {Object} [rich] * @param {Object} [truncate] * @return {Object} {x, y, width, height, lineHeight}

(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate)

Source from the content-addressed store, hash-verified

7636 * @return {Object} {x, y, width, height, lineHeight}
7637 */
7638function getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) {
7639 return rich
7640 ? getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate)
7641 : getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate);
7642}
7643
7644function getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) {
7645 var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate);

Callers 3

labelLayoutFunction · 0.70

Calls 2

getRichTextRectFunction · 0.70
getPlainTextRectFunction · 0.70

Tested by

no test coverage detected