Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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();
});
}