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

Function mergeTheme

libs/echarts/echarts.simple.js:21844–21867  ·  view source on GitHub ↗

* @inner

(option, theme)

Source from the content-addressed store, hash-verified

21842 * @inner
21843 */
21844function mergeTheme(option, theme) {
21845 // PENDING
21846 // NOT use `colorLayer` in theme if option has `color`
21847 var notMergeColorLayer = option.color && !option.colorLayer;
21848
21849 each$1(theme, function (themeItem, name) {
21850 if (name === 'colorLayer' && notMergeColorLayer) {
21851 return;
21852 }
21853 // 如果有 component model 则把具体的 merge 逻辑交给该 model 处理
21854 if (!ComponentModel.hasClass(name)) {
21855 if (typeof themeItem === 'object') {
21856 option[name] = !option[name]
21857 ? clone(themeItem)
21858 : merge(option[name], themeItem, false);
21859 }
21860 else {
21861 if (option[name] == null) {
21862 option[name] = themeItem;
21863 }
21864 }
21865 }
21866 });
21867}
21868
21869function initBase(baseOption) {
21870 baseOption = baseOption;

Callers 1

initBaseFunction · 0.70

Calls 3

each$1Function · 0.70
cloneFunction · 0.70
mergeFunction · 0.70

Tested by

no test coverage detected