Skip to content

Commit

Permalink
Use always targetTouches array
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed Nov 26, 2017
1 parent b87536d commit 8ce7637
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions VoxelSpace.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,7 @@

function GetMousePosition(e)
{
// fix for Chrome
if (isNaN(e.pageX))
{
return [e.targetTouches[0].pageX, e.targetTouches[0].pageY];
} else
{
return [e.pageX, e.pageY];
}
return [e.targetTouches[0].pageX, e.targetTouches[0].pageY];
}


Expand Down

0 comments on commit 8ce7637

Please sign in to comment.