Created
June 4, 2014 14:27
-
-
Save Rudloff/cdc38001248b5f35551f to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/js/sketch.js b/js/sketch.js | |
index 1f5c62f..7048e55 100644 | |
--- a/js/sketch.js | |
+++ b/js/sketch.js | |
@@ -96,7 +96,7 @@ var __slice = Array.prototype.slice; | |
return this.redraw(); | |
}; | |
Sketch.prototype.onEvent = function(e) { | |
- if (e.originalEvent && e.originalEvent.targetTouches) { | |
+ if (e.originalEvent && e.originalEvent.targetTouches && e.originalEvent.targetTouches[0]) { | |
e.pageX = e.originalEvent.targetTouches[0].pageX; | |
e.pageY = e.originalEvent.targetTouches[0].pageY; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment