forked from MapComplete/MapComplete
Performance hacks
This commit is contained in:
parent
686fb29ed3
commit
7090a5ceb8
15 changed files with 167 additions and 93 deletions
|
|
@ -11,6 +11,7 @@ export default abstract class BaseUIElement {
|
|||
private clss: Set<string> = new Set<string>();
|
||||
private style: string;
|
||||
private _onClick: () => void;
|
||||
protected isDestroyed = false;
|
||||
|
||||
public onClick(f: (() => void)) {
|
||||
this._onClick = f;
|
||||
|
|
@ -149,6 +150,10 @@ export default abstract class BaseUIElement {
|
|||
public AsMarkdown(): string {
|
||||
throw "AsMarkdown is not implemented by " + this.constructor.name+"; implement it in the subclass"
|
||||
}
|
||||
|
||||
public Destroy(){
|
||||
this.isDestroyed = true;
|
||||
}
|
||||
|
||||
protected abstract InnerConstructElement(): HTMLElement;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue