index.html : Original file looped through all nodes: point.each(function(d) { d.scanned = d.selected = false; }); This version only touches the nodes scanned by the quadtree (and the previous selection), resulting in faster response
quadtree.js : Experiment in internalizing the area (x1,x2,y1,y2) of each quadrant within each node-object