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

@ -44,7 +44,8 @@ export interface SpecialVisualization {
constr: ((state: State, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState,) => BaseUIElement),
docs: string,
example?: string,
args: { name: string, defaultValue?: string, doc: string }[]
args: { name: string, defaultValue?: string, doc: string }[],
getLayerDependencies?: (argument: string[]) => string[]
}
export default class SpecialVisualizations {
@ -477,6 +478,7 @@ export default class SpecialVisualizations {
}
},
new ImportButtonSpecialViz(),
{
funcName: "multi_apply",
docs: "A button to apply the tagging of this object onto a list of other features. This is an advanced feature for which you'll need calculatedTags",
@ -688,7 +690,7 @@ export default class SpecialVisualizations {
return [arg.name, defaultArg, arg.doc];
})
) : undefined,
new Title("Example usage", 4),
new Title("Example usage of "+viz.funcName, 4),
new FixedUiElement(
viz.example ?? "`{" + viz.funcName + "(" + viz.args.map(arg => arg.defaultValue).join(",") + ")}`"
).SetClass("literal-code"),