index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-22 12:09:50 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-22 12:09:50 -0700 |
commit | c23d9be9545d714d90a380197ba5e8411e73d6df (patch) | |
tree | 8f2d18ff17a22567cbca3cc6aa3ba7d03f9d1edf /src/index.js | |
parent | b443b37a1110866db1352cf201f14f1916cd217b (diff) |
Fade the map in after it is done loading
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js index cb746f4..617e953 100644 --- a/src/index.js +++ b/src/index.js @@ -75,6 +75,12 @@ const RecordSheet = new function () { }; }; +const mapPlaceholder = document.querySelector('.map-placeholder'); +document.querySelector('object').addEventListener('load', function () { + mapPlaceholder.remove(); + this.style.opacity = 1; +}); + window.addEventListener('load', () => { const svg = document.querySelector('object').contentDocument.querySelector('svg'), game = new Game(svg); |