diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-04-21 15:29:21 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-04-22 11:44:57 +0200 |
commit | 3010ff24a7b7c16fa13f865d6485f6dadaa8208f (patch) | |
tree | e029bd7a26762d7fd64f1e14f39637b267ed94d5 | |
parent | 095aa36c921c9ec681ec1bd91f70d8f7e376f525 (diff) | |
download | server-3010ff24a7b7c16fa13f865d6485f6dadaa8208f.tar.gz |
Fix race condition with zoom_map running before the CSS has loaded.
-rw-r--r-- | public/common/play.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/public/common/play.js b/public/common/play.js index cba9870..fc71439 100644 --- a/public/common/play.js +++ b/public/common/play.js @@ -491,8 +491,6 @@ function zoom_map() { } } -zoom_map(); - window.addEventListener("resize", zoom_map); window.addEventListener("keydown", (evt) => { @@ -839,6 +837,7 @@ async function init_replay() { } window.addEventListener("load", function () { + zoom_map(); if (params.mode === "replay") init_replay(); if (params.mode === "play") |