Update life.js

This commit is contained in:
Kyle
2019-08-15 16:34:59 -07:00
parent 193c305272
commit c2394cc948

View File

@@ -175,10 +175,9 @@ function inputCardArtNameNumber(cardArtNameNumberInput) {
playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = cardArtUrlList[cardArtNameNumberInput - 1] playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = cardArtUrlList[cardArtNameNumberInput - 1]
setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500) setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500)
} }
// document.getElementById("mainGrid").addEventListener("touchmove", function(event) { document.getElementById("mainGrid").addEventListener("touchmove", function(event) {
// event.preventDefault() event.preventDefault()
// console.log("it ran?") }, false)
// }, false)
function rollRNG() { function rollRNG() {
document.getElementById("rngOutput").innerHTML = Math.floor(Math.random() * (parseInt(document.getElementById("inputRNGMax").value) - parseInt(document.getElementById("inputRNGMin").value) + 1) + parseInt(document.getElementById("inputRNGMin").value)) document.getElementById("rngOutput").innerHTML = Math.floor(Math.random() * (parseInt(document.getElementById("inputRNGMax").value) - parseInt(document.getElementById("inputRNGMin").value) + 1) + parseInt(document.getElementById("inputRNGMin").value))
} }
@@ -320,6 +319,7 @@ function updateMouseCoordinates() {
} }
function endMouseCoordinates() { function endMouseCoordinates() {
clearTimeout(loop) clearTimeout(loop)
clearTimers()
clicking = false clicking = false
} }
window.addEventListener("touchstart", switchToTouchEvents, true) window.addEventListener("touchstart", switchToTouchEvents, true)
@@ -351,6 +351,7 @@ function moveTouch() {
} }
function endTouch() { function endTouch() {
clearTimeout(loop) clearTimeout(loop)
clearTimers()
if (event.touches.length < 1) { if (event.touches.length < 1) {
clicking = false clicking = false
} }