Temporary fix for touchend bug on mobile

This commit is contained in:
Lewis Hemens 2014-01-12 17:19:15 +00:00
parent 9456de9df9
commit 4e8cb2f1a7
1 changed files with 3 additions and 3 deletions

View File

@ -143,9 +143,9 @@ ascii.Controller.prototype.installTouchBindings = function() {
}); });
$(this.view.canvas).bind('touchend', function(e) { $(this.view.canvas).bind('touchend', function(e) {
e.preventDefault(); e.preventDefault();
controller.handleRelease(new ascii.Vector( // TODO: This works for now as we don't use a touchend position anywhere.
e.originalEvent.touches[0].pageX, // Need to track last position from touchmove and use it here.
e.originalEvent.touches[0].pageY)); controller.handleRelease(new ascii.Vector(0, 0));
}); });
$(this.view.canvas).bind('touchmove', function(e) { $(this.view.canvas).bind('touchmove', function(e) {
e.preventDefault(); e.preventDefault();