Skip to content

Commit

Permalink
Use targetTouches array for touch event
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed Nov 26, 2017
1 parent fa19ad7 commit 8e1c45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VoxelSpace.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
function GetMousePosition(e)
{
// fix for Chrome
if (isNaN(e.pageX))
if (e.type.startsWith('touch'))
{
return [e.targetTouches[0].pageX, e.targetTouches[0].pageY];
} else
Expand Down

0 comments on commit 8e1c45a

Please sign in to comment.