Add LayerIndex convenience function

This commit is contained in:
pietervdvn 2021-04-25 13:23:27 +02:00
parent 0aad17e63c
commit 591ab349a6
1 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,14 @@ export default class LayoutConfig {
icons.add(this.socialImage)
return icons
}
public LayerIndex() : Map<string, LayerConfig>{
const index = new Map<string, LayerConfig>();
for (const layer of this.layers) {
index.set(layer.id, layer)
}
return index;
}
/**
* Replaces all the relative image-urls with a fixed image url