Update life.js

This commit is contained in:
Kyle
2019-10-31 16:22:39 -07:00
parent 2223c78338
commit 8787b3d927

View File

@@ -84,7 +84,12 @@ function startGame() {
console.log("Full screen, rowHeight: " + rowHeight) console.log("Full screen, rowHeight: " + rowHeight)
console.log("screen.height: " + screen.height) console.log("screen.height: " + screen.height)
} else { } else {
rowHeight = window.innerHeight / rowCount - 2 var heightToUse = window.innerHeight
if (document.documentElement.clientHeight > heightToUse) {
console.log("document.documentElement.clientHeight: " + document.documentElement.clientHeight)
heightToUse = document.documentElement.clientHeight
}
rowHeight = heightToUse / rowCount - 2
console.log("Not full screen, rowHeight: " + rowHeight) console.log("Not full screen, rowHeight: " + rowHeight)
console.log("window.innerHeight: " + window.innerHeight) console.log("window.innerHeight: " + window.innerHeight)
} }