lmccart/p5.js — pull request #104 by bobholt (2014-01-27 16:24:57+00:00)
Title: make mouseX and mouseY context-specific - fixes #55

Changes made after discussion with @evhan55:

mouseX and mouseY are now context-specific.

Adds windowMouseX and windowMouseY to track window-level mouse position.

Fixes event handlers to be bound to contexts.

To effectively use windowMouseX and windowMouseY, event handlers have to be attached to the window by the user. P5 does not currently attach window-level handlers when running in advanced mode.