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

Function selection_filter

external/.d3.js:1787–1799  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

1785}
1786
1787function selection_filter(match) {
1788 if (typeof match !== "function") match = matcher(match);
1789
1790 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
1791 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
1792 if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
1793 subgroup.push(node);
1794 }
1795 }
1796 }
1797
1798 return new Selection$1(subgroups, this._parents);
1799}
1800
1801function sparse(update) {
1802 return new Array(update.length);

Callers

nothing calls this directly

Calls 1

matcherFunction · 0.85

Tested by

no test coverage detected