From 8e1c45a6bdcb754069daa3b68265dfa28f79ed07 Mon Sep 17 00:00:00 2001 From: Sebastian Macke Date: Sun, 26 Nov 2017 14:49:16 +0100 Subject: [PATCH] Use targetTouches array for touch event --- VoxelSpace.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VoxelSpace.html b/VoxelSpace.html index 0795635..9eb0312 100755 --- a/VoxelSpace.html +++ b/VoxelSpace.html @@ -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