forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
f77570589d
commit
9b8a9337fd
111 changed files with 2911 additions and 1280 deletions
|
|
@ -9,14 +9,18 @@
|
|||
|
||||
export let state: EditLayerState | EditThemeState
|
||||
|
||||
let rawConfig = state.configuration.sync(f => JSON.stringify(f, null, " "), [], json => {
|
||||
try {
|
||||
return JSON.parse(json)
|
||||
} catch (e) {
|
||||
console.error("Could not parse", json)
|
||||
return undefined
|
||||
let rawConfig = state.configuration.sync(
|
||||
(f) => JSON.stringify(f, null, " "),
|
||||
[],
|
||||
(json) => {
|
||||
try {
|
||||
return JSON.parse(json)
|
||||
} catch (e) {
|
||||
console.error("Could not parse", json)
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
let container: HTMLDivElement
|
||||
let monaco: typeof Monaco
|
||||
|
|
@ -88,7 +92,7 @@
|
|||
model = monaco?.editor?.createModel(
|
||||
JSON.stringify(state.configuration.data, null, " "),
|
||||
"json",
|
||||
modelUri,
|
||||
modelUri
|
||||
)
|
||||
} catch (e) {
|
||||
console.error("Could not create model in MOnaco Editor", e)
|
||||
|
|
@ -126,7 +130,7 @@
|
|||
{:else}
|
||||
<div bind:this={container} class="h-full w-full">
|
||||
{#if !isLoaded}
|
||||
<div class="h-full w-full flex items-center align-center">
|
||||
<div class="align-center flex h-full w-full items-center">
|
||||
<Loading />
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue