Live at http://bl.ocks.org/paradite/71869a0f30592ade5246
gist at https://gist.github.com/paradite/71869a0f30592ade5246/
Features:
- Drag using mouse to select an area
- Uses d3.behavior.drag(), able to co-exist with click events using manual triggers
- Selection rectangle renders correctly even when the mouse moves in opposite directions
Inspired by https://gist.github.com/lgersman/5311083