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

Function makeDepndencyGraph

libs/echarts/echarts.simple.js:18774–18801  ·  view source on GitHub ↗

* DepndencyGraph: {Object} * key: conponentType, * value: { * successor: [conponentTypes...], * originalDeps: [conponentTypes...], * entryCount: {number} * }

(fullNameList)

Source from the content-addressed store, hash-verified

18772 * }
18773 */
18774 function makeDepndencyGraph(fullNameList) {
18775 var graph = {};
18776 var noEntryList = [];
18777
18778 each$1(fullNameList, function (name) {
18779
18780 var thisItem = createDependencyGraphItem(graph, name);
18781 var originalDeps = thisItem.originalDeps = dependencyGetter(name);
18782
18783 var availableDeps = getAvailableDependencies(originalDeps, fullNameList);
18784 thisItem.entryCount = availableDeps.length;
18785 if (thisItem.entryCount === 0) {
18786 noEntryList.push(name);
18787 }
18788
18789 each$1(availableDeps, function (dependentName) {
18790 if (indexOf(thisItem.predecessor, dependentName) < 0) {
18791 thisItem.predecessor.push(dependentName);
18792 }
18793 var thatItem = createDependencyGraphItem(graph, dependentName);
18794 if (indexOf(thatItem.successor, dependentName) < 0) {
18795 thatItem.successor.push(name);
18796 }
18797 });
18798 });
18799
18800 return {graph: graph, noEntryList: noEntryList};
18801 }
18802
18803 function createDependencyGraphItem(graph, name) {
18804 if (!graph[name]) {

Callers 1

enableTopologicalTravelFunction · 0.70

Calls 5

pushMethod · 0.80
each$1Function · 0.70
getAvailableDependenciesFunction · 0.70
indexOfFunction · 0.70

Tested by

no test coverage detected