forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
612e71a4b6
commit
511d20eb34
245 changed files with 43884 additions and 8661 deletions
|
|
@ -6,17 +6,17 @@ import SpecialVisualizations from "../../UI/SpecialVisualizations"
|
|||
|
||||
export default class DependencyCalculator {
|
||||
public static GetTagRenderingDependencies(tr: TagRenderingConfig): {
|
||||
id: string,
|
||||
minzoom?: number,
|
||||
id: string
|
||||
minzoom?: number
|
||||
neededBy: string
|
||||
}[] {
|
||||
if (tr === undefined) {
|
||||
throw "Got undefined tag rendering in getTagRenderingDependencies"
|
||||
}
|
||||
const deps: { id: string, minZoom?: number, neededBy: string }[] = []
|
||||
const deps: { id: string; minZoom?: number; neededBy: string }[] = []
|
||||
|
||||
if (tr.requiredLayers) {
|
||||
deps.push(...tr.requiredLayers.map(req => ({ ...req, neededBy: tr.id })))
|
||||
deps.push(...tr.requiredLayers.map((req) => ({ ...req, neededBy: tr.id })))
|
||||
}
|
||||
|
||||
// All translated snippets
|
||||
|
|
@ -29,7 +29,11 @@ export default class DependencyCalculator {
|
|||
.map((p) => <{ func: SpecialVisualization; args: string[] }>p)
|
||||
.filter((o) => o?.func?.getLayerDependencies !== undefined)
|
||||
for (const specialViz of specialVizs) {
|
||||
deps.push(...specialViz.func.getLayerDependencies(specialViz.args).map(id => ({ id, neededBy: tr.id })))
|
||||
deps.push(
|
||||
...specialViz.func
|
||||
.getLayerDependencies(specialViz.args)
|
||||
.map((id) => ({ id, neededBy: tr.id }))
|
||||
)
|
||||
}
|
||||
}
|
||||
return deps
|
||||
|
|
@ -51,7 +55,7 @@ export default class DependencyCalculator {
|
|||
reason: string
|
||||
context?: string
|
||||
neededBy: string
|
||||
checkHasSnapName: boolean,
|
||||
checkHasSnapName: boolean
|
||||
minzoom?: number
|
||||
}[] = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue