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-05-19 21:32:42 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-05-19 21:42:39 -0700 |
commit | c692bc90207c4b04771f953ce5924100a1889cae (patch) | |
tree | 01afbbc26ec34bc7746631c6fd611b23ad6d18d1 /src/modules/map_select_dialog.js | |
parent | ff7e88457c72f9cca9d2fdd965d8a4fd0e3de48a (diff) |
Simplify loading scenarios
Diffstat (limited to 'src/modules/map_select_dialog.js')
-rw-r--r-- | src/modules/map_select_dialog.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/map_select_dialog.js b/src/modules/map_select_dialog.js index fc8eecc..2a4622a 100644 --- a/src/modules/map_select_dialog.js +++ b/src/modules/map_select_dialog.js @@ -29,12 +29,12 @@ export function init() { return this; }, - changeMapOnConfirm() { + changeMapOnConfirm(loadFn) { confirmBtn.addEventListener('click', e => { e.preventDefault(); localStorage.removeItem('pan-zoom'); localStorage.setItem('map', selectEl.value); - document.querySelector('object').data = `assets/images/${selectEl.value}.svg`; + loadFn(`assets/images/${selectEl.value}.svg`); mapDialog.close(); }); } |