(n, d, x, y, x1, y1, x2, y2)
| 4558 | } |
| 4559 | } |
| 4560 | function insertChild(n, d, x, y, x1, y1, x2, y2) { |
| 4561 | var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = x >= sx, bottom = y >= sy, i = (bottom << 1) + right; |
| 4562 | n.leaf = false; |
| 4563 | n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode()); |
| 4564 | if (right) x1 = sx; else x2 = sx; |
| 4565 | if (bottom) y1 = sy; else y2 = sy; |
| 4566 | insert(n, d, x, y, x1, y1, x2, y2); |
| 4567 | } |
| 4568 | var root = d3_geom_quadtreeNode(); |
| 4569 | root.add = function(d) { |
| 4570 | insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_); |
no test coverage detected