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

Function d3_layout_treeSearch

explainshell/web/static/js/d3.v3.js:5895–5906  ·  view source on GitHub ↗
(node, compare)

Source from the content-addressed store, hash-verified

5893 return children && (n = children.length) ? children[n - 1] : node._tree.thread;
5894 }
5895 function d3_layout_treeSearch(node, compare) {
5896 var children = node.children;
5897 if (children && (n = children.length)) {
5898 var child, n, i = -1;
5899 while (++i < n) {
5900 if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
5901 node = child;
5902 }
5903 }
5904 }
5905 return node;
5906 }
5907 function d3_layout_treeRightmost(a, b) {
5908 return a.x - b.x;
5909 }

Callers 1

treeFunction · 0.85

Calls 1

compareFunction · 0.85

Tested by

no test coverage detected