chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-06-18 21:40:01 +02:00
parent 94c61744c0
commit 04c8ccb0d2
89 changed files with 2353 additions and 1390 deletions

View file

@ -6,17 +6,24 @@ import SpecialVisualizations from "../../UI/SpecialVisualizations"
import { LayerConfigJson } from "./Json/LayerConfigJson"
export default class DependencyCalculator {
/**
* For every tagRendering in the listed layers, determines in what layers they end up
*/
public static tagRenderingImportedBy(questionedLayer: LayerConfig, layers: LayerConfig[]): Map<string, {
layer: string
}[]> {
public static tagRenderingImportedBy(
questionedLayer: LayerConfig,
layers: LayerConfig[]
): Map<
string,
{
layer: string
}[]
> {
const result: Map<string, { layer: string }[]> = new Map()
for (const layer of layers) {
const hasRightContext = layer.tagRenderings.filter(tr => tr._definedIn !== undefined && tr?._definedIn?.[0] === questionedLayer.id)
const hasRightContext = layer.tagRenderings.filter(
(tr) => tr._definedIn !== undefined && tr?._definedIn?.[0] === questionedLayer.id
)
for (const tr of hasRightContext) {
const id = tr._definedIn[1]
if (!result.has(id)) {