forked from MapComplete/MapComplete
More cleanup of wikipedia functionality; add parameters to substitutedTranslation
This commit is contained in:
parent
b3586e32ce
commit
864792ff95
4 changed files with 67 additions and 42 deletions
|
@ -17,7 +17,8 @@ export class SubstitutedTranslation extends VariableUiElement {
|
|||
translation: Translation,
|
||||
tagsSource: UIEventSource<any>,
|
||||
state: FeaturePipelineState,
|
||||
mapping: Map<string, BaseUIElement> = undefined) {
|
||||
mapping: Map<string, BaseUIElement |
|
||||
((state: FeaturePipelineState, tagSource: UIEventSource<any>, argument: string[], guistate: DefaultGuiState) => BaseUIElement)> = undefined) {
|
||||
|
||||
const extraMappings: SpecialVisualization[] = [];
|
||||
|
||||
|
@ -25,9 +26,7 @@ export class SubstitutedTranslation extends VariableUiElement {
|
|||
extraMappings.push(
|
||||
{
|
||||
funcName: key,
|
||||
constr: (() => {
|
||||
return value
|
||||
}),
|
||||
constr: typeof value === "function" ? value : () => value,
|
||||
docs: "Dynamically injected input element",
|
||||
args: [],
|
||||
example: ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue