toolkit/javascript/d3/src/core/transition-select.js
changeset 47 c0b4a8b5a012
equal deleted inserted replaced
46:efd9c589177a 47:c0b4a8b5a012
       
     1 d3_transitionPrototype.select = function(selector) {
       
     2   var subgroups = [],
       
     3       subgroup,
       
     4       subnode,
       
     5       node;
       
     6 
       
     7   if (typeof selector !== "function") selector = d3_selection_selector(selector);
       
     8 
       
     9   for (var j = -1, m = this.length; ++j < m;) {
       
    10     subgroups.push(subgroup = []);
       
    11     for (var group = this[j], i = -1, n = group.length; ++i < n;) {
       
    12       if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {
       
    13         if ("__data__" in node.node) subnode.__data__ = node.node.__data__;
       
    14         subgroup.push({node: subnode, delay: node.delay, duration: node.duration});
       
    15       } else {
       
    16         subgroup.push(null);
       
    17       }
       
    18     }
       
    19   }
       
    20 
       
    21   return d3_transition(subgroups, this.id, this.time).ease(this.ease());
       
    22 };