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