Sha256: b328b79c521cd66adac0e14ae3574168fb866136568cbd166fa06a6b636f7ad3

Contents?: true

Size: 825 Bytes

Versions: 5

Compression:

Stored size: 825 Bytes

Contents

import "selection";

d3_selectionPrototype.select = function(selector) {
  var subgroups = [],
      subgroup,
      subnode,
      group,
      node;

  selector = d3_selection_selector(selector);

  for (var j = -1, m = this.length; ++j < m;) {
    subgroups.push(subgroup = []);
    subgroup.parentNode = (group = this[j]).parentNode;
    for (var i = -1, n = group.length; ++i < n;) {
      if (node = group[i]) {
        subgroup.push(subnode = selector.call(node, node.__data__, i, j));
        if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
      } else {
        subgroup.push(null);
      }
    }
  }

  return d3_selection(subgroups);
};

function d3_selection_selector(selector) {
  return typeof selector === "function" ? selector : function() {
    return d3_select(selector, this);
  };
}

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
mdarray-sol-0.1.0-java node_modules/dc/node_modules/d3/src/selection/select.js
stripchart-0.0.3 lib/stripchart/public/components/d3/src/selection/select.js
stripmem-0.0.3 lib/stripmem/public/components/d3/src/selection/select.js
stripmem-0.0.2 lib/stripmem/public/components/d3/src/selection/select.js
stripmem-0.0.1 lib/stripmem/public/components/d3/src/selection/select.js