forked from MapComplete/MapComplete
Some restructuring of documentation
This commit is contained in:
parent
04e3dc5623
commit
806c20ecb4
2 changed files with 30 additions and 28 deletions
|
@ -26,9 +26,7 @@ export default class Title extends BaseUIElement {
|
||||||
} else if (embedded instanceof FixedUiElement) {
|
} else if (embedded instanceof FixedUiElement) {
|
||||||
innerText = embedded.content
|
innerText = embedded.content
|
||||||
} else {
|
} else {
|
||||||
if (Utils.runningFromConsole) {
|
if (!Utils.runningFromConsole) {
|
||||||
console.log("Not constructing an anchor for title with embedded content of " + embedded)
|
|
||||||
} else {
|
|
||||||
innerText = embedded.ConstructElement()?.innerText
|
innerText = embedded.ConstructElement()?.innerText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,8 +209,10 @@ class NearbyImageVis implements SpecialVisualization {
|
||||||
|
|
||||||
const radiusValue = state?.osmConnection?.GetPreference("nearby-images-radius", "300").map(s => Number(s), [], i => "" + i) ?? new UIEventSource(300);
|
const radiusValue = state?.osmConnection?.GetPreference("nearby-images-radius", "300").map(s => Number(s), [], i => "" + i) ?? new UIEventSource(300);
|
||||||
|
|
||||||
const radius = new Slider(25, 500, {value:
|
const radius = new Slider(25, 500, {
|
||||||
radiusValue, step: 25})
|
value:
|
||||||
|
radiusValue, step: 25
|
||||||
|
})
|
||||||
const alreadyInTheImage = AllImageProviders.LoadImagesFor(tagSource)
|
const alreadyInTheImage = AllImageProviders.LoadImagesFor(tagSource)
|
||||||
const options: NearbyImageOptions & { value } = {
|
const options: NearbyImageOptions & { value } = {
|
||||||
lon, lat,
|
lon, lat,
|
||||||
|
@ -283,10 +285,8 @@ export default class SpecialVisualizations {
|
||||||
|
|
||||||
public static specialVisualizations: SpecialVisualization[] = SpecialVisualizations.init()
|
public static specialVisualizations: SpecialVisualization[] = SpecialVisualizations.init()
|
||||||
|
|
||||||
public static HelpMessage() {
|
public static DocumentationFor(viz: SpecialVisualization): BaseUIElement {
|
||||||
|
return new Combine(
|
||||||
const helpTexts =
|
|
||||||
SpecialVisualizations.specialVisualizations.map(viz => new Combine(
|
|
||||||
[
|
[
|
||||||
new Title(viz.funcName, 3),
|
new Title(viz.funcName, 3),
|
||||||
viz.docs,
|
viz.docs,
|
||||||
|
@ -304,8 +304,12 @@ export default class SpecialVisualizations {
|
||||||
viz.example ?? "`{" + viz.funcName + "(" + viz.args.map(arg => arg.defaultValue).join(",") + ")}`"
|
viz.example ?? "`{" + viz.funcName + "(" + viz.args.map(arg => arg.defaultValue).join(",") + ")}`"
|
||||||
).SetClass("literal-code"),
|
).SetClass("literal-code"),
|
||||||
|
|
||||||
]
|
])
|
||||||
));
|
}
|
||||||
|
|
||||||
|
public static HelpMessage() {
|
||||||
|
|
||||||
|
const helpTexts = SpecialVisualizations.specialVisualizations.map(viz => SpecialVisualizations.DocumentationFor(viz));
|
||||||
|
|
||||||
return new Combine([
|
return new Combine([
|
||||||
new Combine([
|
new Combine([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue