diff --git a/Docs/BuiltinIndex.md b/Docs/BuiltinIndex.md index 3dbbb7a5a..83872f143 100644 --- a/Docs/BuiltinIndex.md +++ b/Docs/BuiltinIndex.md @@ -24,6 +24,7 @@ + [smoking](#smoking) + [service:electricity](#serviceelectricity) + [dog-access](#dog-access) + + [reviews](#reviews) + [climbing.website](#climbingwebsite) + [climbing.fee](#climbingfee) + [climbing.bouldering](#climbingbouldering) @@ -33,7 +34,6 @@ + [climbing.sportclimbing](#climbingsportclimbing) + [climbing.max_bolts](#climbingmax_bolts) + [all_tags](#all_tags) - + [reviews](#reviews) + [questions](#questions) + [export_as_gpx](#export_as_gpx) + [export_as_geojson](#export_as_geojson) @@ -335,6 +335,22 @@ +### reviews + + + + + + - cafe_pub + - dogpark + - food + - hackerspace + - shops + - veterinary + + + + ### climbing.website @@ -436,20 +452,6 @@ -### reviews - - - - - - - dogpark - - food - - shops - - veterinary - - - - ### questions diff --git a/Docs/SpecialRenderings.md b/Docs/SpecialRenderings.md index 68b334062..c4ed606d5 100644 --- a/Docs/SpecialRenderings.md +++ b/Docs/SpecialRenderings.md @@ -697,13 +697,14 @@ zoom | 18 | The startzoom of mapillary ### auto_apply - A button to run many actions for many features at once. + A button to run many actions for many features at once. To effectively use this button, you'll need some ingredients: -To effectively use this button, you'll need some ingredients: -- A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: import_way_button, tag_apply -- 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 + - A target layer with features for which an action is defined in a tag rendering. The following special visualisations support an autoAction: import_way_button, tag_apply + - 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 + - [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 + name | default | description ------ | --------- | ------------- diff --git a/UI/Popup/AutoApplyButton.ts b/UI/Popup/AutoApplyButton.ts index 8c1e00f7a..2f824854d 100644 --- a/UI/Popup/AutoApplyButton.ts +++ b/UI/Popup/AutoApplyButton.ts @@ -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, argument: string[], guistate: DefaultGuiState): BaseUIElement { diff --git a/UI/SpecialVisualizations.ts b/UI/SpecialVisualizations.ts index 37efa9f13..d036b9bec 100644 --- a/UI/SpecialVisualizations.ts +++ b/UI/SpecialVisualizations.ts @@ -61,7 +61,7 @@ import Slider from "./Input/Slider"; export interface SpecialVisualization { funcName: string, constr: ((state: FeaturePipelineState, tagSource: UIEventSource, argument: string[], guistate: DefaultGuiState,) => BaseUIElement), - docs: string, + docs: string | BaseUIElement, example?: string, args: { name: string, defaultValue?: string, doc: string, required?: false | boolean }[], getLayerDependencies?: (argument: string[]) => string[]