forked from MapComplete/MapComplete
Full code cleanup
This commit is contained in:
parent
8e6ee8c87f
commit
bd21212eba
246 changed files with 19418 additions and 11729 deletions
|
|
@ -1,16 +1,16 @@
|
|||
import BaseUIElement from "../BaseUIElement";
|
||||
|
||||
export default class Lazy extends BaseUIElement{
|
||||
export default class Lazy extends BaseUIElement {
|
||||
private readonly _f: () => BaseUIElement;
|
||||
|
||||
|
||||
constructor(f: () => BaseUIElement) {
|
||||
super();
|
||||
this._f = f;
|
||||
}
|
||||
|
||||
|
||||
protected InnerConstructElement(): HTMLElement {
|
||||
// The caching of the BaseUIElement will guarantee that _f will only be called once
|
||||
return this._f().ConstructElement();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue