mapcomplete/UI/Base/VariableUIElement.ts

19 lines
531 B
TypeScript
Raw Normal View History

2020-06-29 01:12:44 +00:00
import {UIElement} from "../UIElement";
import {UIEventSource} from "../../Logic/UIEventSource";
export class VariableUiElement extends UIElement {
private _html: UIEventSource<string>;
private _innerUpdate: (htmlElement: HTMLElement) => void;
constructor(html: UIEventSource<string>, innerUpdate : ((htmlElement : HTMLElement) => void) = undefined) {
super(html);
this._html = html;
this._innerUpdate = innerUpdate;
}
2020-07-20 16:24:00 +00:00
InnerRender(): string {
return this._html.data;
}
}