forked from MapComplete/MapComplete
Reformat all files with prettier
This commit is contained in:
parent
e22d189376
commit
b541d3eab4
382 changed files with 50893 additions and 35566 deletions
|
@ -1,31 +1,32 @@
|
|||
import {ReadonlyInputElement} from "./InputElement";
|
||||
import {Store} from "../../Logic/UIEventSource";
|
||||
import BaseUIElement from "../BaseUIElement";
|
||||
import {VariableUiElement} from "../Base/VariableUIElement";
|
||||
import { ReadonlyInputElement } from "./InputElement"
|
||||
import { Store } from "../../Logic/UIEventSource"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import { VariableUiElement } from "../Base/VariableUIElement"
|
||||
|
||||
export default class VariableInputElement<T> extends BaseUIElement implements ReadonlyInputElement<T> {
|
||||
|
||||
private readonly value: Store<T>;
|
||||
export default class VariableInputElement<T>
|
||||
extends BaseUIElement
|
||||
implements ReadonlyInputElement<T>
|
||||
{
|
||||
private readonly value: Store<T>
|
||||
private readonly element: BaseUIElement
|
||||
private readonly upstream: Store<ReadonlyInputElement<T>>;
|
||||
private readonly upstream: Store<ReadonlyInputElement<T>>
|
||||
|
||||
constructor(upstream: Store<ReadonlyInputElement<T>>) {
|
||||
super()
|
||||
this.upstream = upstream;
|
||||
this.value = upstream.bind(v => v.GetValue())
|
||||
this.upstream = upstream
|
||||
this.value = upstream.bind((v) => v.GetValue())
|
||||
this.element = new VariableUiElement(upstream)
|
||||
}
|
||||
|
||||
GetValue(): Store<T> {
|
||||
return this.value;
|
||||
return this.value
|
||||
}
|
||||
|
||||
IsValid(t: T): boolean {
|
||||
return this.upstream.data.IsValid(t);
|
||||
return this.upstream.data.IsValid(t)
|
||||
}
|
||||
|
||||
protected InnerConstructElement(): HTMLElement {
|
||||
return this.element.ConstructElement();
|
||||
return this.element.ConstructElement()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue