equal
deleted
inserted
replaced
|
1 d3_selectionPrototype.selectAll = function(selector) { |
|
2 var subgroups = [], |
|
3 subgroup, |
|
4 node; |
|
5 |
|
6 if (typeof selector !== "function") selector = d3_selection_selectorAll(selector); |
|
7 |
|
8 for (var j = -1, m = this.length; ++j < m;) { |
|
9 for (var group = this[j], i = -1, n = group.length; ++i < n;) { |
|
10 if (node = group[i]) { |
|
11 subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i))); |
|
12 subgroup.parentNode = node; |
|
13 } |
|
14 } |
|
15 } |
|
16 |
|
17 return d3_selection(subgroups); |
|
18 }; |
|
19 |
|
20 function d3_selection_selectorAll(selector) { |
|
21 return function() { |
|
22 return d3_selectAll(selector, this); |
|
23 }; |
|
24 } |