Add LayerIndex convenience function
This commit is contained in:
parent
0aad17e63c
commit
591ab349a6
1 changed files with 8 additions and 0 deletions
|
@ -211,6 +211,14 @@ export default class LayoutConfig {
|
||||||
return icons
|
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
|
* Replaces all the relative image-urls with a fixed image url
|
||||||
* This is to fix loading from external sources
|
* This is to fix loading from external sources
|
||||||
|
|
Loading…
Reference in a new issue