2020-06-29 03:12:44 +02:00
|
|
|
import {UIElement} from "../UIElement";
|
2020-06-24 00:35:19 +02:00
|
|
|
|
|
|
|
export class VerticalCombine extends UIElement {
|
2020-10-02 19:00:24 +02:00
|
|
|
private readonly _elements: UIElement[];
|
2020-06-28 00:06:23 +02:00
|
|
|
|
2020-10-02 19:00:24 +02:00
|
|
|
constructor(elements: UIElement[]) {
|
2020-06-24 00:35:19 +02:00
|
|
|
super(undefined);
|
|
|
|
this._elements = elements;
|
|
|
|
}
|
|
|
|
|
2020-07-29 15:05:19 +02:00
|
|
|
InnerRender(): string {
|
2020-06-24 00:35:19 +02:00
|
|
|
let html = "";
|
2020-06-28 00:06:23 +02:00
|
|
|
for (const element of this._elements) {
|
2020-10-02 19:00:24 +02:00
|
|
|
if (element !== undefined && !element.IsEmpty()) {
|
2020-06-28 00:06:23 +02:00
|
|
|
html += "<div>" + element.Render() + "</div>";
|
2020-06-24 00:35:19 +02:00
|
|
|
}
|
2020-06-28 00:06:23 +02:00
|
|
|
}
|
2020-10-02 19:00:24 +02:00
|
|
|
return html;
|
2020-06-24 00:35:19 +02:00
|
|
|
}
|
|
|
|
}
|