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
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() {
var now = (new Date()).getTime()
if (now - lastTouchEnd <= 300) {
event.preventDefault()
}
lastTouchEnd = now
for (var i = 1; i <= playerList.length; i++) {
if (playerList[i - 1].touchId == event.changedTouches[0].identifier) {
playerList[i - 1].touchId = 0.5