More refactoring and fixes

This commit is contained in:
Pieter Vander Vennet 2022-06-06 19:37:22 +02:00
parent 1bc7d9118a
commit 9877abec17
14 changed files with 375 additions and 151 deletions

View file

@ -1,4 +1,4 @@
import {InputElement, ReadonlyInputElement} from "./InputElement";
import {ReadonlyInputElement} from "./InputElement";
import {Store} from "../../Logic/UIEventSource";
import BaseUIElement from "../BaseUIElement";
import {VariableUiElement} from "../Base/VariableUIElement";
@ -7,9 +7,9 @@ export default class VariableInputElement<T> extends BaseUIElement implements Re
private readonly value: Store<T>;
private readonly element: BaseUIElement
private readonly upstream: Store<InputElement<T>>;
private readonly upstream: Store<ReadonlyInputElement<T>>;
constructor(upstream: Store<InputElement<T>>) {
constructor(upstream: Store<ReadonlyInputElement<T>>) {
super()
this.upstream = upstream;
this.value = upstream.bind(v => v.GetValue())