MCPcopy Create free account
hub / github.com/breck7/scroll / node_eachAfter

Function node_eachAfter

external/.d3.js:13045–13059  ·  view source on GitHub ↗
(callback, that)

Source from the content-addressed store, hash-verified

13043}
13044
13045function node_eachAfter(callback, that) {
13046 var node = this, nodes = [node], next = [], children, i, n, index = -1;
13047 while (node = nodes.pop()) {
13048 next.push(node);
13049 if (children = node.children) {
13050 for (i = 0, n = children.length; i < n; ++i) {
13051 nodes.push(children[i]);
13052 }
13053 }
13054 }
13055 while (node = next.pop()) {
13056 callback.call(that, node, ++index, this);
13057 }
13058 return this;
13059}
13060
13061function node_find(callback, that) {
13062 let index = -1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected