From 8787b3d9270e78aa4a8e8d530509a3f856370492 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Thu, 31 Oct 2019 16:22:39 -0700 Subject: [PATCH] Update life.js --- data/site/other/life/life.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/site/other/life/life.js b/data/site/other/life/life.js index 44a2766e..1a7fd38d 100644 --- a/data/site/other/life/life.js +++ b/data/site/other/life/life.js @@ -84,7 +84,12 @@ function startGame() { console.log("Full screen, rowHeight: " + rowHeight) console.log("screen.height: " + screen.height) } 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("window.innerHeight: " + window.innerHeight) }