(properties)
| 12468 | // TODO Parse shadow style |
| 12469 | // TODO Only shallow path support |
| 12470 | var 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 |
no test coverage detected