mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/RoboCommander.git
synced 2026-06-16 07:16:03 +00:00
Initial commit
This commit is contained in:
9
node_modules/d3-hierarchy/src/hierarchy/sum.js
generated
vendored
Normal file
9
node_modules/d3-hierarchy/src/hierarchy/sum.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export default function(value) {
|
||||
return this.eachAfter(function(node) {
|
||||
var sum = +value(node.data) || 0,
|
||||
children = node.children,
|
||||
i = children && children.length;
|
||||
while (--i >= 0) sum += children[i].value;
|
||||
node.value = sum;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user