forked from MapComplete/MapComplete
Fix: better select available levels
This commit is contained in:
parent
4c962eab21
commit
7b73578f88
1 changed files with 6 additions and 8 deletions
|
@ -5,6 +5,8 @@ import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
|||
import { OsmConnection } from "../Osm/OsmConnection"
|
||||
import { Tag } from "../Tags/Tag"
|
||||
import Translations from "../../UI/i18n/Translations"
|
||||
import { RegexTag } from "../Tags/RegexTag"
|
||||
import { Or } from "../Tags/Or"
|
||||
|
||||
/**
|
||||
* The layer state keeps track of:
|
||||
|
@ -43,13 +45,6 @@ export default class LayerState {
|
|||
}
|
||||
this.filteredLayers = filteredLayers
|
||||
layers.forEach((l) => LayerState.linkFilterStates(l, filteredLayers))
|
||||
|
||||
this.globalFilters.data.push({
|
||||
id: "level",
|
||||
osmTags: undefined,
|
||||
state: undefined,
|
||||
onNewPoint: undefined,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +68,10 @@ export default class LayerState {
|
|||
this.globalFilters.data.push({
|
||||
id: "level",
|
||||
state: level,
|
||||
osmTags: new Tag("level", level),
|
||||
osmTags: new Or([
|
||||
new Tag("level", "" + level),
|
||||
new RegexTag("level", new RegExp("(.*;)?" + level + "(;.*)?")),
|
||||
]),
|
||||
onNewPoint: {
|
||||
tags: [new Tag("level", level)],
|
||||
icon: "./assets/svg/elevator.svg",
|
||||
|
|
Loading…
Reference in a new issue