Fix: improve detection of needed layers

This commit is contained in:
Pieter Vander Vennet 2025-05-06 13:57:50 +02:00
parent 6c730f5581
commit f94914297f

View file

@ -108,9 +108,7 @@ export default class DependencyCalculator {
} }
let currentKey = undefined let currentKey = undefined
let currentLine = undefined let currentLine = undefined
const params: ExtraFuncParams = { const detectNearyFeatures = (layerId) => {
getFeatureById: () => undefined,
getFeaturesWithin: (layerId) => {
if (layerId === "*") { if (layerId === "*") {
// This is a wildcard // This is a wildcard
return [] return []
@ -126,11 +124,15 @@ export default class DependencyCalculator {
"] which calculates the value for " + "] which calculates the value for " +
currentKey, currentKey,
neededBy: layer.id, neededBy: layer.id,
checkHasSnapName: false, checkHasSnapName: false
}) })
return [] return []
}, }
const params: ExtraFuncParams = {
getFeatureById: () => undefined,
getFeaturesWithin: detectNearyFeatures,
getProbablyOverlapsWith: detectNearyFeatures
} }
const helpers = ExtraFunctions.constructHelpers(params) const helpers = ExtraFunctions.constructHelpers(params)
// ... Run the calculated tag code, which will trigger the getFeaturesWithin above... // ... Run the calculated tag code, which will trigger the getFeaturesWithin above...