From c692bc90207c4b04771f953ce5924100a1889cae Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sun, 19 May 2024 21:32:42 -0700
Subject: Simplify loading scenarios
---
src/modules/map_select_dialog.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/modules/map_select_dialog.js')
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();
});
}
--
cgit v1.2.3