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

Function d3_layout_treeMove

explainshell/web/static/js/d3.v3.js:5940–5949  ·  view source on GitHub ↗
(ancestor, node, shift)

Source from the content-addressed store, hash-verified

5938 }
5939 }
5940 function d3_layout_treeMove(ancestor, node, shift) {
5941 ancestor = ancestor._tree;
5942 node = node._tree;
5943 var change = shift / (node.number - ancestor.number);
5944 ancestor.change += change;
5945 node.change -= change;
5946 node.shift += shift;
5947 node.prelim += shift;
5948 node.mod += shift;
5949 }
5950 function d3_layout_treeAncestor(vim, node, ancestor) {
5951 return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
5952 }

Callers 1

apportionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected