(children, k)
| 6491 | d3.layout.treemap = function() { |
| 6492 | 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)); |
| 6493 | function scale(children, k) { |
| 6494 | var i = -1, n = children.length, child, area; |
| 6495 | while (++i < n) { |
| 6496 | area = (child = children[i]).value * (k < 0 ? 0 : k); |
| 6497 | child.area = isNaN(area) || area <= 0 ? 0 : area; |
| 6498 | } |
| 6499 | } |
| 6500 | function squarify(node) { |
| 6501 | var children = node.children; |
| 6502 | if (children && children.length) { |
no test coverage detected