forked from MapComplete/MapComplete
Lots of styling, mobile friendliness, better UI flows
This commit is contained in:
parent
0b4016b65d
commit
57c9fcc5aa
28 changed files with 440 additions and 117 deletions
|
@ -2,20 +2,28 @@ import {UIElement} from "./UIElement";
|
|||
|
||||
export class VerticalCombine extends UIElement {
|
||||
private _elements: UIElement[];
|
||||
|
||||
constructor(elements: UIElement[]) {
|
||||
private _className: string;
|
||||
|
||||
constructor(elements: UIElement[], className: string = undefined) {
|
||||
super(undefined);
|
||||
this._elements = elements;
|
||||
this._className = className;
|
||||
}
|
||||
|
||||
protected InnerRender(): string {
|
||||
let html = "";
|
||||
for (const element of this._elements){
|
||||
for (const element of this._elements) {
|
||||
if (!element.IsEmpty()) {
|
||||
html += "<div>" + element.Render() + "</div><br />";
|
||||
html += "<div>" + element.Render() + "</div>";
|
||||
}
|
||||
}
|
||||
return html;
|
||||
}
|
||||
if(html === ""){
|
||||
return "";
|
||||
}
|
||||
if (this._className === undefined) {
|
||||
return html;
|
||||
}
|
||||
return "<div class='"+this._className+"'>" + html + "</div>";
|
||||
}
|
||||
InnerUpdate(htmlElement: HTMLElement) {
|
||||
for (const element of this._elements){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue