chr15m/jsGameSoup — pull request #2 by jeremyosborne (2012-09-17 19:56:09+00:00)
Title: Updated the mouse coordinate tracking code allow for canvas elements

Updated the mouse coordinate tracking code allow for canvas elements that are positioned in odd positions, or that have a containing parent. Also bullet proofed it a bit so that it's not dependent on browser sniffing. What I did not do is optimize it in any way, as we could avoid always regenerating the canvas offset if the window has not been scrolled.

One way to see the change is to use the demos/mousetracking.html with the code before and after the change. I should have improved the demo on firefox: on my version I get a floating point Y coordinate.