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

Function retrieve

test/lib/testHelper.js:2838–2868  ·  view source on GitHub ↗
(elList, plainNodes)

Source from the content-addressed store, hash-verified

2836
2837 // Only retrieve the value of the given attrName.
2838 function retrieve(elList, plainNodes) {
2839 var anySatisfied = false;
2840 for (var i = 0; i < elList.length; i++) {
2841 var el = elList[i];
2842
2843 var thisElSatisfied = !opt.filter || opt.filter(el);
2844
2845 var plainNode = {};
2846
2847 copyElment(plainNode, el);
2848
2849 var textContent = el.getTextContent();
2850 if (textContent) {
2851 plainNode.textContent = {};
2852 copyElment(plainNode.textContent, textContent);
2853 }
2854
2855 var thisSubAnySatisfied = false;
2856 if (el.isGroup) {
2857 plainNode.children = [];
2858 thisSubAnySatisfied = retrieve(el.childrenRef(), plainNode.children);
2859 }
2860
2861 if (thisElSatisfied || thisSubAnySatisfied) {
2862 plainNodes.push(plainNode);
2863 anySatisfied = true;
2864 }
2865 }
2866
2867 return anySatisfied;
2868 }
2869
2870 function copyElment(plainNode, el) {
2871 for (var i = 0; i < attrNameList.length; i++) {

Callers 5

testHelper.jsFile · 0.85
markLineTransformFunction · 0.85
markAreaTransformFunction · 0.85
axisNameFunction · 0.85
buildAxisLabelFunction · 0.85

Calls 2

copyElmentFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…