forked from MapComplete/MapComplete
Fix: etymology theme now supports multi-apply again, uses lower zoom level for multiselect
This commit is contained in:
parent
2cc943889d
commit
90869a1c98
7 changed files with 65 additions and 82 deletions
|
@ -53,7 +53,13 @@ export class MinimapViz implements SpecialVisualization {
|
|||
}
|
||||
|
||||
let idList = [value]
|
||||
if (key !== "id" && value.startsWith("[")) {
|
||||
if (Array.isArray(value)) {
|
||||
idList = value
|
||||
} else if (
|
||||
key !== "id" &&
|
||||
typeof value === "string" &&
|
||||
value?.startsWith("[")
|
||||
) {
|
||||
// This is a list of values
|
||||
idList = JSON.parse(value)
|
||||
}
|
||||
|
|
|
@ -47,7 +47,10 @@ export class MultiApplyViz implements SpecialVisualization {
|
|||
if (ids === undefined) {
|
||||
return []
|
||||
}
|
||||
return JSON.parse(ids)
|
||||
if (typeof ids === "string" && ids.startsWith("[")) {
|
||||
return JSON.parse(ids)
|
||||
}
|
||||
return ids
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
"Could not parse ",
|
||||
|
|
|
@ -52,6 +52,7 @@ export interface SpecialVisualizationState {
|
|||
* Works together with 'selectedElement' to indicate what properties should be displayed
|
||||
*/
|
||||
readonly selectedLayer: UIEventSource<LayerConfig>
|
||||
readonly selectedElementAndLayer: Store<{ feature: Feature; layer: LayerConfig }>
|
||||
|
||||
/**
|
||||
* If data is currently being fetched from external sources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue