This commit is contained in:
Kyle
2019-08-18 15:51:22 -07:00
parent dbd6a8b088
commit 3101179d9e
2 changed files with 8 additions and 2 deletions

View File

@@ -264,9 +264,15 @@ function moveTouch() {
touchX[i] = event.touches[i].clientX touchX[i] = event.touches[i].clientX
touchY[i] = event.touches[i].clientY touchY[i] = event.touches[i].clientY
} }
// setTimeout(function(){window.scrollTo(0, 0)},50)
} }
//Attempt at getting past webkit's really annoying double tap zoom. Because it's been five years and they haven't added support for css's touch-action. Because I'm sure they have a really good excuse...
var lastTouchEnd = 0
function endTouch() { function endTouch() {
var now = (new Date()).getTime()
if (now - lastTouchEnd <= 300) {
event.preventDefault()
}
lastTouchEnd = now
for (var i = 1; i <= playerList.length; i++) { for (var i = 1; i <= playerList.length; i++) {
if (playerList[i - 1].touchId == event.changedTouches[0].identifier) { if (playerList[i - 1].touchId == event.changedTouches[0].identifier) {
playerList[i - 1].touchId = 0.5 playerList[i - 1].touchId = 0.5

View File

@@ -54,7 +54,7 @@
Starting Life Total:<br> Starting Life Total:<br>
<input id="inputStartingLife" class="input" type="number" min="0" value="40"><br> <input id="inputStartingLife" class="input" type="number" min="0" value="40"><br>
<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button><br><br> <button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button><br><br>
For an optimal experience, save this website to your home screen and open it from there.<br>Check out my other website, <a href="https://cardconjurer.com">Card Conjurer</a>, to easily create custom Magic cards! For an optimal experience, save this website to your home screen and open it from there.<br><br><div style="font-size: 0.75em">Check out my other website, <a style="font-size: inherit" href="https://cardconjurer.com">Card Conjurer</a>, to easily create custom Magic cards!</div>
</div> </div>
</div> </div>
<div onclick="fullscreen()" class="hidden" id="return">CLICK ANYWHERE TO RETURN TO FULLSCREEN</div> <div onclick="fullscreen()" class="hidden" id="return">CLICK ANYWHERE TO RETURN TO FULLSCREEN</div>