Created
May 15, 2011 01:51
-
-
Save mkeen/972824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class InterfaceWindow | |
| constructor: -> | |
| # Bind the basic events | |
| $(window).mousemove (event) => this.mouseMoved(event.clientX, event.clientY) | |
| mouseMoved: (x, y) -> | |
| console.log(x + " " + y) | |
| new InterfaceWindow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var InterfaceWindow; | |
| var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
| InterfaceWindow = (function() { | |
| function InterfaceWindow() { | |
| $(window).mousemove(__bind(function(event) { | |
| return this.mouseMoved(event.clientX, event.clientY); | |
| }, this)); | |
| } | |
| InterfaceWindow.prototype.mouseMoved = function(x, y) { | |
| return console.log(x + " " + y); | |
| }; | |
| return InterfaceWindow; | |
| })(); | |
| new InterfaceWindow; | |
| }).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment