WIP: more features in inspector

This commit is contained in:
Pieter Vander Vennet 2024-11-25 23:44:26 +01:00
parent c34300fae1
commit 552ea22275
19 changed files with 526 additions and 65 deletions

View file

@ -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