wesbos/websocket-canvas-draw — pull request #2 by jseb (2012-12-30 23:26:45+00:00)
Title: Fix for issue #1 "Drawn lines are not under cursor in Chrome"

Fixed offset calculation to work also in Chrome, using code from this stackoverflow answer: http://stackoverflow.com/a/5932203

Tested in Chrome Version 23.0.1271.101, Firefox Version 17.0.1, Safari 6.02.