Range selection tool

I made this range selection tool, the example is on rangeSelector.html
It pretty much covers the mouse selection behavior and zooming yet it still could use some improvement.