(dy, n)
| 13644 | } |
| 13645 | |
| 13646 | function positionNode(dy, n) { |
| 13647 | return function(node) { |
| 13648 | if (node.children) { |
| 13649 | treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); |
| 13650 | } |
| 13651 | var x0 = node.x0, |
| 13652 | y0 = node.y0, |
| 13653 | x1 = node.x1 - padding, |
| 13654 | y1 = node.y1 - padding; |
| 13655 | if (x1 < x0) x0 = x1 = (x0 + x1) / 2; |
| 13656 | if (y1 < y0) y0 = y1 = (y0 + y1) / 2; |
| 13657 | node.x0 = x0; |
| 13658 | node.y0 = y0; |
| 13659 | node.x1 = x1; |
| 13660 | node.y1 = y1; |
| 13661 | }; |
| 13662 | } |
| 13663 | |
| 13664 | partition.round = function(x) { |
| 13665 | return arguments.length ? (round = !!x, partition) : round; |
no test coverage detected