equal
deleted
inserted
replaced
|
1 function d3_selection(groups) { |
|
2 d3_arraySubclass(groups, d3_selectionPrototype); |
|
3 return groups; |
|
4 } |
|
5 |
|
6 var d3_select = function(s, n) { return n.querySelector(s); }, |
|
7 d3_selectAll = function(s, n) { return n.querySelectorAll(s); }; |
|
8 |
|
9 // Prefer Sizzle, if available. |
|
10 if (typeof Sizzle === "function") { |
|
11 d3_select = function(s, n) { return Sizzle(s, n)[0]; }; |
|
12 d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); }; |
|
13 } |
|
14 |
|
15 var d3_selectionPrototype = []; |
|
16 |
|
17 d3.selection = function() { |
|
18 return d3_selectionRoot; |
|
19 }; |
|
20 |
|
21 d3.selection.prototype = d3_selectionPrototype; |