Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-05-19 21:32:42 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-05-19 21:42:39 -0700
commitc692bc90207c4b04771f953ce5924100a1889cae (patch)
tree01afbbc26ec34bc7746631c6fd611b23ad6d18d1 /src/modules/map_select_dialog.js
parentff7e88457c72f9cca9d2fdd965d8a4fd0e3de48a (diff)
Simplify loading scenarios
Diffstat (limited to 'src/modules/map_select_dialog.js')
-rw-r--r--src/modules/map_select_dialog.js4
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();
});
}