forked from MapComplete/MapComplete
Debug tools: Re-evaluate known keys if evaluate is clicked
This commit is contained in:
parent
386ab7d79d
commit
12a200c54d
1 changed files with 12 additions and 1 deletions
|
@ -19,7 +19,17 @@
|
||||||
const name = calculated[0]
|
const name = calculated[0]
|
||||||
calculatedTags.push(name)
|
calculatedTags.push(name)
|
||||||
}
|
}
|
||||||
let knownValues: Store<string[]> = tags.map((tags) => Object.keys(tags))
|
let knownValues: UIEventSource<string[]> = new UIEventSource<string[]>([])
|
||||||
|
|
||||||
|
tags.addCallbackAndRunD(tags => {
|
||||||
|
knownValues.setData(Object.keys(tags))
|
||||||
|
})
|
||||||
|
|
||||||
|
function reEvalKnownValues(){
|
||||||
|
knownValues.setData(Object.keys(tags.data))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const metaKeys: string[] = [].concat(...SimpleMetaTaggers.metatags.map((k) => k.keys))
|
const metaKeys: string[] = [].concat(...SimpleMetaTaggers.metatags.map((k) => k.keys))
|
||||||
let allCalculatedTags = new Set<string>([...calculatedTags, ...metaKeys])
|
let allCalculatedTags = new Set<string>([...calculatedTags, ...metaKeys])
|
||||||
|
@ -90,6 +100,7 @@
|
||||||
class="small"
|
class="small"
|
||||||
on:click={(_) => {
|
on:click={(_) => {
|
||||||
console.log($tags[key])
|
console.log($tags[key])
|
||||||
|
reEvalKnownValues()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Evaluate
|
Evaluate
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue