MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / getTextXForPadding

Function getTextXForPadding

libs/echarts/echarts.simple.js:8925–8931  ·  view source on GitHub ↗
(x, textAlign, textPadding)

Source from the content-addressed store, hash-verified

8923}
8924
8925function getTextXForPadding(x, textAlign, textPadding) {
8926 return textAlign === 'right'
8927 ? (x - textPadding[1])
8928 : textAlign === 'center'
8929 ? (x + textPadding[3] / 2 - textPadding[1] / 2)
8930 : (x + textPadding[3]);
8931}
8932
8933/**
8934 * @param {string} text

Callers 2

renderPlainTextFunction · 0.70
placeTokenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected