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

Function makeStyleMapper

libs/echarts/echarts-en.simple.js:12470–12493  ·  view source on GitHub ↗
(properties)

Source from the content-addressed store, hash-verified

12468// TODO Parse shadow style
12469// TODO Only shallow path support
12470var makeStyleMapper = function (properties) {
12471 // Normalize
12472 for (var i = 0; i < properties.length; i++) {
12473 if (!properties[i][1]) {
12474 properties[i][1] = properties[i][0];
12475 }
12476 }
12477 return function (model, excludes, includes) {
12478 var style = {};
12479 for (var i = 0; i < properties.length; i++) {
12480 var propName = properties[i][1];
12481 if ((excludes && indexOf(excludes, propName) >= 0)
12482 || (includes && indexOf(includes, propName) < 0)
12483 ) {
12484 continue;
12485 }
12486 var val = model.getShallow(propName);
12487 if (val != null) {
12488 style[properties[i][0]] = val;
12489 }
12490 }
12491 return style;
12492 };
12493};
12494
12495/*
12496* Licensed to the Apache Software Foundation (ASF) under one

Callers 1

Calls 1

indexOfFunction · 0.70

Tested by

no test coverage detected