From 90e75daabb51631ea5c1bbbeb987f4a180cec20d Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sun, 20 Dec 2015 04:42:52 +0200 Subject: [PATCH] better showcanvas fix --- miner.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/miner.js b/miner.js index 8b19670..65458ea 100644 --- a/miner.js +++ b/miner.js @@ -1445,7 +1445,7 @@ function loadData () { score = 0; curLSet = 0; curRoomNo = 0; - setTimeout(startRoom, 100); + setTimeout(startRoom, 10); }, 10); } @@ -1478,15 +1478,16 @@ function initCanvas () { canvas.style.left = mainX+"px"; canvas.style.top = mainY+"px"; }, false); - - document.body.appendChild(canvas); } this.run = function () { gameRunning = false; initCanvas(); - loadData(); + setTimeout(function () { + document.body.appendChild(canvas); + setTimeout(loadData, 10); + }, 10); }; -- 2.11.4.GIT