source: node_modules/d3-hierarchy/src/treemap/slice.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 309 bytes
RevLine 
[e4c61dd]1export default function(parent, x0, y0, x1, y1) {
2 var nodes = parent.children,
3 node,
4 i = -1,
5 n = nodes.length,
6 k = parent.value && (y1 - y0) / parent.value;
7
8 while (++i < n) {
9 node = nodes[i], node.x0 = x0, node.x1 = x1;
10 node.y0 = y0, node.y1 = y0 += node.value * k;
11 }
12}
Note: See TracBrowser for help on using the repository browser.