Update life.js

This commit is contained in:
Kyle
2019-08-15 18:14:14 -07:00
parent d0f985c0e1
commit 17cc53509a

View File

@@ -336,6 +336,7 @@ function switchToTouchEvents() {
window.addEventListener("touchend", endTouch, true) window.addEventListener("touchend", endTouch, true)
} }
function startTouch() { function startTouch() {
moveTouch()
if (!clicking) { if (!clicking) {
if (event.touches.length > 0) { if (event.touches.length > 0) {
clicking = true clicking = true
@@ -353,6 +354,7 @@ function moveTouch() {
} }
} }
function endTouch() { function endTouch() {
moveTouch()
if (event.touches.length < 1) { if (event.touches.length < 1) {
clicking = false clicking = false
clearTimeout(loop) clearTimeout(loop)