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

Function d3_layout_packTransform

explainshell/web/static/js/d3.v3.js:6079–6088  ·  view source on GitHub ↗
(node, x, y, k)

Source from the content-addressed store, hash-verified

6077 delete node._pack_prev;
6078 }
6079 function d3_layout_packTransform(node, x, y, k) {
6080 var children = node.children;
6081 node.x = x += k * node.x;
6082 node.y = y += k * node.y;
6083 node.r *= k;
6084 if (children) {
6085 var i = -1, n = children.length;
6086 while (++i < n) d3_layout_packTransform(children[i], x, y, k);
6087 }
6088 }
6089 function d3_layout_packPlace(a, b, c) {
6090 var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
6091 if (db && (dx || dy)) {

Callers 1

packFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected