MCPcopy
hub / github.com/apache/echarts / compatTextStyle

Function compatTextStyle

src/preprocessor/helper/compatStyle.ts:122–138  ·  view source on GitHub ↗
(opt: any, propName: string)

Source from the content-addressed store, hash-verified

120}
121
122function compatTextStyle(opt: any, propName: string) {
123 // Check whether is not object (string\null\undefined ...)
124 const labelOptSingle = isObject(opt) && opt[propName];
125 const textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle;
126 if (textStyle) {
127 if (__DEV__) {
128 // eslint-disable-next-line max-len
129 deprecateLog(`textStyle hierarchy in ${propName} has been removed since 4.0. All textStyle properties are configured in ${propName} directly now.`);
130 }
131 for (let i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) {
132 const textPropName = modelUtil.TEXT_STYLE_OPTIONS[i];
133 if (textStyle.hasOwnProperty(textPropName)) {
134 labelOptSingle[textPropName] = textStyle[textPropName];
135 }
136 }
137 }
138}
139
140function compatEC3CommonStyles(opt: Dictionary<any>) {
141 if (opt) {

Callers 3

compatEC3CommonStylesFunction · 0.85
processSeriesFunction · 0.85
globalCompatStyleFunction · 0.85

Calls 2

deprecateLogFunction · 0.90
isObjectFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…