Sourced from: http://mbostock.github.io/d3/talk/20111018/collision.html