MCPcopy Create free account
hub / github.com/breck7/scroll / selection_select

Function selection_select

external/.d3.js:1684–1697  ·  view source on GitHub ↗
(select)

Source from the content-addressed store, hash-verified

1682}
1683
1684function selection_select(select) {
1685 if (typeof select !== "function") select = selector(select);
1686
1687 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1688 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
1689 if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
1690 if ("__data__" in node) subnode.__data__ = node.__data__;
1691 subgroup[i] = subnode;
1692 }
1693 }
1694 }
1695
1696 return new Selection$1(subgroups, this._parents);
1697}
1698
1699// Given something array like (or null), returns something that is strictly an
1700// array. This is used to ensure that array-like objects passed to d3.selectAll

Callers

nothing calls this directly

Calls 1

selectorFunction · 0.85

Tested by

no test coverage detected