diff options
author | Douglas T. Crosher <dtc-moz@scieneer.com> | 2013-07-11 14:18:38 +1000 |
---|---|---|
committer | Douglas T. Crosher <dtc-moz@scieneer.com> | 2013-07-11 14:18:38 +1000 |
commit | ab79dffb3382c8503b30f3247802733f7b645c61 (patch) | |
tree | abce89f88aa74d394971891dd727d5a30b64982e | |
parent | f3f2eabd377c84860934cca9f8057cc77b98cf5c (diff) |
Update the AUTHORS file, and address some code style issues.
-rw-r--r-- | src/library_sdl.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index ce98ce5c..af71da26 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -367,38 +367,38 @@ var LibrarySDL = { switch(event.type) { case 'touchstart': event.preventDefault(); - var touch = event.touches[ 0 ]; + var touch = event.touches[0]; touchX = touch.pageX; touchY = touch.pageY; var event = { - type: 'mousedown', - button: 0, - pageX: touchX, - pageY: touchY + type: 'mousedown', + button: 0, + pageX: touchX, + pageY: touchY }; SDL.DOMButtons[0] = 1; SDL.events.push(event); break; case 'touchmove': event.preventDefault(); - var touch = event.touches[ 0 ]; + var touch = event.touches[0]; touchX = touch.pageX; touchY = touch.pageY; event = { - type: 'mousemove', - button: 0, - pageX: touchX, - pageY: touchY + type: 'mousemove', + button: 0, + pageX: touchX, + pageY: touchY }; SDL.events.push(event); break; case 'touchend': event.preventDefault(); event = { - type: 'mouseup', - button: 0, - pageX: touchX, - pageY: touchY + type: 'mouseup', + button: 0, + pageX: touchX, + pageY: touchY }; SDL.DOMButtons[0] = 0; SDL.events.push(event); |