(node)
| 13009 | } |
| 13010 | |
| 13011 | function count(node) { |
| 13012 | var sum = 0, |
| 13013 | children = node.children, |
| 13014 | i = children && children.length; |
| 13015 | if (!i) sum = 1; |
| 13016 | else while (--i >= 0) sum += children[i].value; |
| 13017 | node.value = sum; |
| 13018 | } |
| 13019 | |
| 13020 | function node_count() { |
| 13021 | return this.eachAfter(count); |