MCPcopy
hub / github.com/tdewolff/minify / convertNormalEmphasis

Function convertNormalEmphasis

_benchmarks/sample_echarts.js:19137–19175  ·  view source on GitHub ↗
(opt, optType, useExtend)

Source from the content-addressed store, hash-verified

19135 }
19136
19137 function convertNormalEmphasis(opt, optType, useExtend) {
19138 if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
19139 var normalOpt = opt[optType].normal;
19140 var emphasisOpt = opt[optType].emphasis;
19141
19142 if (normalOpt) {
19143 if ("development" !== 'production') {
19144 // eslint-disable-next-line max-len
19145 deprecateLog("'normal' hierarchy in " + optType + " has been removed since 4.0. All style properties are configured in " + optType + " directly now.");
19146 } // Timeline controlStyle has other properties besides normal and emphasis
19147
19148
19149 if (useExtend) {
19150 opt[optType].normal = opt[optType].emphasis = null;
19151 defaults(opt[optType], normalOpt);
19152 } else {
19153 opt[optType] = normalOpt;
19154 }
19155 }
19156
19157 if (emphasisOpt) {
19158 if ("development" !== 'production') {
19159 deprecateLog(optType + ".emphasis has been changed to emphasis." + optType + " since 4.0");
19160 }
19161
19162 opt.emphasis = opt.emphasis || {};
19163 opt.emphasis[optType] = emphasisOpt; // Also compat the case user mix the style and focus together in ec3 style
19164 // for example: { itemStyle: { normal: {}, emphasis: {focus, shadowBlur} } }
19165
19166 if (emphasisOpt.focus) {
19167 opt.emphasis.focus = emphasisOpt.focus;
19168 }
19169
19170 if (emphasisOpt.blurScope) {
19171 opt.emphasis.blurScope = emphasisOpt.blurScope;
19172 }
19173 }
19174 }
19175 }
19176
19177 function removeEC3NormalStatus(opt) {
19178 convertNormalEmphasis(opt, 'itemStyle');

Callers 3

removeEC3NormalStatusFunction · 0.85
processSeriesFunction · 0.85
globalCompatStyleFunction · 0.85

Calls 2

deprecateLogFunction · 0.85
defaultsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…