forked from MapComplete/MapComplete
Refactoring: use proper way to initialize the main svelte components
This commit is contained in:
parent
4dc48274dc
commit
5354cbf6c3
15 changed files with 43 additions and 30 deletions
|
@ -52,8 +52,10 @@ async function main() {
|
|||
])
|
||||
console.log("The available layers on server are", Array.from(availableLayers))
|
||||
const state = new ThemeViewState(layout, availableLayers)
|
||||
const main = new SvelteUIElement(ThemeViewGUI, { state })
|
||||
main.AttachTo("maindiv")
|
||||
new ThemeViewGUI({
|
||||
target: document.getElementById("maindiv"),
|
||||
props: {state}
|
||||
})
|
||||
Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => {
|
||||
el.parentElement.removeChild(el)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue