udacity/cs291 — pull request #14 by FrenchYann (2013-05-13 19:55:08+00:00)
Title: simpler and more reliable mouseX/Y code

In unit10-picking, the mouse projection wasn't right if your page was scrolled.

Since the canvas was of size window.innerWidth,window.innerHeight and there was an extra menu on top to selection demo and exercises, scrollbar could appear.

Another solution would be to resize the canvas automagically on window.onresize() and somehow get the height of this menu section, but it seems like a pain (without using jQuery).
To me that's more the mouseX/Y code that was a wrong.

My change was tested on chrome and firefox.