forked from MapComplete/MapComplete
WIP: more features in inspector
This commit is contained in:
parent
c34300fae1
commit
552ea22275
19 changed files with 526 additions and 65 deletions
|
|
@ -41,6 +41,7 @@ export default class Constants {
|
|||
"usersettings",
|
||||
"icons",
|
||||
"filters",
|
||||
"usertouched"
|
||||
] as const
|
||||
/**
|
||||
* Layer IDs of layers which have special properties through built-in hooks
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ export default class ThemeConfig implements ThemeInformation {
|
|||
return { untranslated, total }
|
||||
}
|
||||
|
||||
public getMatchingLayer(tags: Record<string, string>): LayerConfig | undefined {
|
||||
public getMatchingLayer(tags: Record<string, string>, blacklistLayers?: Set<string>): LayerConfig | undefined {
|
||||
if (tags === undefined) {
|
||||
return undefined
|
||||
}
|
||||
|
|
@ -314,6 +314,9 @@ export default class ThemeConfig implements ThemeInformation {
|
|||
return this.getLayer("current_view")
|
||||
}
|
||||
for (const layer of this.layers) {
|
||||
if(blacklistLayers?.has(layer.id)){
|
||||
continue
|
||||
}
|
||||
if (!layer.source) {
|
||||
if (layer.isShown?.matchesProperties(tags)) {
|
||||
return layer
|
||||
|
|
|
|||
|
|
@ -1040,7 +1040,7 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
|||
/**
|
||||
* Searches the appropriate layer - will first try if a special layer matches; if not, a normal layer will be used by delegating to the theme
|
||||
*/
|
||||
public getMatchingLayer(properties: Record<string, string>) {
|
||||
public getMatchingLayer(properties: Record<string, string>): LayerConfig | undefined {
|
||||
const id = properties.id
|
||||
|
||||
if (id.startsWith("summary_")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue