Created
April 10, 2012 18:41
-
-
Save talentless/2353579 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
// quick ugly hack to get touches working on the prototype | |
if (type === "touchstart" || type === "touchmove" || type === "touchend") { | |
pos=Crafty.DOM.translate(e.touches[0].clientX, e.touches[0].clientY); | |
e.x = e.touches[0].clientX; | |
e.y = e.touches[0].clientY; | |
} | |
if (type === "touchstart") type = "mousedown"; | |
else if (type === "touchmove") type = "mousemove"; | |
else if (type === "touchend") type = "mouseup"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment