Further improvements to entrances theme, add layer-crossdependency detection, add layers which another layer depends on automatically to the theme, add documentation on which layers depends on which other layers, regenerate documentation

This commit is contained in:
Pieter Vander Vennet 2021-12-05 02:06:14 +01:00
parent 8e40d76281
commit 0ee23ce36d
27 changed files with 9032 additions and 331 deletions

View file

@ -140,6 +140,20 @@ ${Utils.Special_visualizations_tagsToApplyHelpText}
defaultValue: "5"
}]
getLayerDependencies(args: string[]){
const dependsOnLayers: string[] = []
// The target layer
dependsOnLayers.push(args[0])
const snapOntoLayers = args[5]?.trim() ?? "";
if(args[5] !== ""){
dependsOnLayers.push(...snapOntoLayers.split(";"))
}
return dependsOnLayers
}
constr(state, tagSource, args, guiState) {
if (!state.layoutToUse.official && !(state.featureSwitchIsTesting.data || state.osmConnection._oauth_config.url === OsmConnection.oauth_configs["osm-test"].url)) {
return new Combine([new FixedUiElement("The import button is disabled for unofficial themes to prevent accidents.").SetClass("alert"),