MCPcopy Create free account
hub / github.com/idank/explainshell / d3_layout_treeVisitAfter

Function d3_layout_treeVisitAfter

explainshell/web/static/js/d3.v3.js:5916–5930  ·  view source on GitHub ↗
(node, callback)

Source from the content-addressed store, hash-verified

5914 return a.depth - b.depth;
5915 }
5916 function d3_layout_treeVisitAfter(node, callback) {
5917 function visit(node, previousSibling) {
5918 var children = node.children;
5919 if (children && (n = children.length)) {
5920 var child, previousChild = null, i = -1, n;
5921 while (++i < n) {
5922 child = children[i];
5923 visit(child, previousChild);
5924 previousChild = child;
5925 }
5926 }
5927 callback(node, previousSibling);
5928 }
5929 visit(node, null);
5930 }
5931 function d3_layout_treeShift(node) {
5932 var shift = 0, change = 0, children = node.children, i = children.length, child;
5933 while (--i >= 0) {

Callers 3

treeFunction · 0.85
packFunction · 0.85
clusterFunction · 0.85

Calls 1

visitFunction · 0.85

Tested by

no test coverage detected