forked from MapComplete/MapComplete
Small documentation update
This commit is contained in:
parent
16ca1e6caa
commit
5370fb7c6d
4 changed files with 38 additions and 31 deletions
|
@ -23,6 +23,7 @@ import {UIElement} from "../UIElement";
|
|||
import FilteredLayer from "../../Models/FilteredLayer";
|
||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
||||
import Lazy from "../Base/Lazy";
|
||||
import List from "../Base/List";
|
||||
|
||||
export interface AutoAction extends SpecialVisualization {
|
||||
supportsAutoAction: boolean
|
||||
|
@ -154,7 +155,7 @@ class ApplyButton extends UIElement {
|
|||
}
|
||||
|
||||
export default class AutoApplyButton implements SpecialVisualization {
|
||||
public readonly docs: string;
|
||||
public readonly docs: BaseUIElement;
|
||||
public readonly funcName: string = "auto_apply";
|
||||
public readonly args: { name: string; defaultValue?: string; doc: string, required?: boolean }[] = [
|
||||
{
|
||||
|
@ -189,14 +190,17 @@ export default class AutoApplyButton implements SpecialVisualization {
|
|||
}
|
||||
|
||||
private static generateDocs(supportedActions: string[]) {
|
||||
return [
|
||||
"A button to run many actions for many features at once.\n",
|
||||
"To effectively use this button, you'll need some ingredients:\n" +
|
||||
"- A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: " + supportedActions.join(", "),
|
||||
"- A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the [current_view](./BuiltinLayers.md#current_view)",
|
||||
"- Then, use a calculated tag on the host feature to determine the overlapping object ids",
|
||||
"- At last, add this component"
|
||||
].join("\n")
|
||||
return new Combine([
|
||||
"A button to run many actions for many features at once.",
|
||||
"To effectively use this button, you'll need some ingredients:",
|
||||
new List([
|
||||
"A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: " + supportedActions.join(", "),
|
||||
"A host feature to place the auto-action on. This can be a big outline (such as a city). Another good option for this is the layer ", new Link("current_view","./BuiltinLayers.md#current_view"),
|
||||
"Then, use a calculated tag on the host feature to determine the overlapping object ids",
|
||||
"At last, add this component"
|
||||
]),
|
||||
|
||||
])
|
||||
}
|
||||
|
||||
constr(state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState): BaseUIElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue