Update main.js

Hi Bryan,

Thank yo so much for your code shared in the internet with your blog I found at this link http://bloggingmath.wordpress.com/2009/05/29/line-segment-intersection/ and wanted to extend or edit to make the rectangle shape (or square) where it intersect look exactly where it is. Just a slight changed.
Merge pull request #1 from toytoy/patch-1

Update main.js, better centering of mouse click with drawing.