Skip to content

Instantly share code, notes, and snippets.

@jimkang
Created April 14, 2014 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimkang/10669854 to your computer and use it in GitHub Desktop.
Save jimkang/10669854 to your computer and use it in GitHub Desktop.
Generates a D3 quadtree visit function that performs a series of operations on each visited node.
function combineVisitFunctions() {
var fns = arguments;
return function combinedVisit(node, x1, y1, x2, y2) {
for (var i = 0; i < fns.length; ++i) {
fns[i](node, x1, y1, x2, y2);
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment