From ef15df2905af6dad7e31ba843b15d0b64bae844e Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 2 Jun 2015 16:14:22 +0200 Subject: [PATCH] Corrected replay --- js/prototype/replay.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/js/prototype/replay.js b/js/prototype/replay.js index 90847ce..7147749 100644 --- a/js/prototype/replay.js +++ b/js/prototype/replay.js @@ -1,3 +1,19 @@ +var isFullscreen = false; +var beenFullscreen = false; + +var main_section = document.getElementById('main-section'); +var container_size = { + width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, + height: function() { + if (!isFullscreen) + return main_section.clientHeight + - document.getElementById('nav').offsetHeight + - document.getElementById('main-div').offsetHeight; + else + return screen.height; + } +}; + var onWindowResize = (function() { // Disable scrolling @@ -15,22 +31,8 @@ var stats; var loader; var coins = []; -var beenFullscreen = false; -var isFullscreen = false; var previousTime; -var main_section = document.getElementById('main-section'); -var container_size = { - width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, - height: function() { - if (!isFullscreen) - return main_section.clientHeight - - document.getElementById('nav').offsetHeight - - document.getElementById('main-div').offsetHeight; - else - return screen.height; - } -}; init(); animate();