MCPcopy Index your code
hub / github.com/idank/explainshell / scale

Function scale

explainshell/web/static/js/d3.v3.js:6157–6163  ·  view source on GitHub ↗
(children, k)

Source from the content-addressed store, hash-verified

6155 d3.layout.treemap = function() {
6156 var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
6157 function scale(children, k) {
6158 var i = -1, n = children.length, child, area;
6159 while (++i < n) {
6160 area = (child = children[i]).value * (k < 0 ? 0 : k);
6161 child.area = isNaN(area) || area <= 0 ? 0 : area;
6162 }
6163 }
6164 function squarify(node) {
6165 var children = node.children;
6166 if (children && children.length) {

Callers 5

azimuthalFunction · 0.85
squarifyFunction · 0.85
stickifyFunction · 0.85
treemapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected