From 591ab349a68dd09b673c122d0047f64d79a84915 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 25 Apr 2021 13:23:27 +0200 Subject: [PATCH] Add LayerIndex convenience function --- Customizations/JSON/LayoutConfig.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Customizations/JSON/LayoutConfig.ts b/Customizations/JSON/LayoutConfig.ts index 67396de..ad78762 100644 --- a/Customizations/JSON/LayoutConfig.ts +++ b/Customizations/JSON/LayoutConfig.ts @@ -210,6 +210,14 @@ export default class LayoutConfig { icons.add(this.socialImage) return icons } + + public LayerIndex() : Map{ + const index = new Map(); + for (const layer of this.layers) { + index.set(layer.id, layer) + } + return index; + } /** * Replaces all the relative image-urls with a fixed image url