forked from MapComplete/MapComplete
Fixing too many bugs, cleaning up some old parts of the code
This commit is contained in:
parent
3d05999f85
commit
00a6611e1f
21 changed files with 706 additions and 436 deletions
|
@ -68,7 +68,7 @@ export abstract class UIElement extends UIEventSource<string> {
|
|||
if (UIElement.runningFromConsole) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let element = document.getElementById(this.id);
|
||||
if (element === undefined || element === null) {
|
||||
// The element is not painted
|
||||
|
@ -99,7 +99,7 @@ export abstract class UIElement extends UIEventSource<string> {
|
|||
if (element.innerHTML === "") {
|
||||
element.parentElement.style.display = "none";
|
||||
} else {
|
||||
element.parentElement.style.display = undefined;
|
||||
element.parentElement.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ export abstract class UIElement extends UIEventSource<string> {
|
|||
|
||||
public abstract InnerRender(): string;
|
||||
|
||||
public Activate(): void {
|
||||
public Activate(): UIElement {
|
||||
for (const i in this) {
|
||||
const child = this[i];
|
||||
if (child instanceof UIElement) {
|
||||
|
@ -187,6 +187,7 @@ export abstract class UIElement extends UIEventSource<string> {
|
|||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
public IsEmpty(): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue