forked from MapComplete/MapComplete
Feature(statistics): add filter state to URL
This commit is contained in:
parent
99aa5403ca
commit
e66391fc03
2 changed files with 4 additions and 4 deletions
|
@ -81,7 +81,7 @@ export default class FilteredLayer {
|
|||
public static initLinkedState(
|
||||
layer: LayerConfig,
|
||||
context: string,
|
||||
osmConnection: OsmConnection,
|
||||
osmConnection?: OsmConnection,
|
||||
enabledByDefault?: Store<boolean>
|
||||
) {
|
||||
let isDisplayed: UIEventSource<boolean>
|
||||
|
@ -90,13 +90,13 @@ export default class FilteredLayer {
|
|||
context + "-layer-" + layer.id + "-enabled",
|
||||
layer.shownByDefault
|
||||
)
|
||||
} else if (layer.syncSelection === "theme-only") {
|
||||
} else if (layer.syncSelection === "theme-only" && osmConnection) {
|
||||
isDisplayed = FilteredLayer.getPref(
|
||||
osmConnection,
|
||||
context + "-layer-" + layer.id + "-enabled",
|
||||
layer
|
||||
)
|
||||
} else if (layer.syncSelection === "global") {
|
||||
} else if (layer.syncSelection === "global" && osmConnection) {
|
||||
isDisplayed = FilteredLayer.getPref(
|
||||
osmConnection,
|
||||
"layer-" + layer.id + "-enabled",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
let downloaded = 0
|
||||
const layer = new ThemeConfig(<ThemeConfigJson>mcChanges, true).layers[0]
|
||||
const filteredLayer = new FilteredLayer(layer)
|
||||
const filteredLayer = FilteredLayer.initLinkedState(layer, "mapcomplete_changes")
|
||||
|
||||
const downloadData: () => Promise<(ChangeSetData & OsmFeature)[]> = async () => {
|
||||
const results = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue