Formatting, remove old, unused code
This commit is contained in:
parent
a365172e0c
commit
89df28ae06
1 changed files with 62 additions and 62 deletions
|
@ -8,16 +8,12 @@ import {UIEventSource} from "../Logic/UIEventSource";
|
|||
*/
|
||||
export default abstract class BaseUIElement {
|
||||
|
||||
protected _constructedHtmlElement: HTMLElement;
|
||||
private clss: Set<string> = new Set<string>();
|
||||
private style: string;
|
||||
private _onClick: () => void;
|
||||
private _onHover: UIEventSource<boolean>;
|
||||
|
||||
protected _constructedHtmlElement: HTMLElement;
|
||||
|
||||
|
||||
protected abstract InnerConstructElement(): HTMLElement;
|
||||
|
||||
public onClick(f: (() => void)) {
|
||||
this._onClick = f;
|
||||
this.SetClass("clickable")
|
||||
|
@ -44,6 +40,7 @@ export default abstract class BaseUIElement {
|
|||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds all the relevant classes, space seperated
|
||||
*/
|
||||
|
@ -151,7 +148,8 @@ try{
|
|||
el.addEventListener('mouseout', () => self._onHover.setData(false));
|
||||
}
|
||||
|
||||
return el}catch(e){
|
||||
return el
|
||||
} catch (e) {
|
||||
const domExc = e as DOMException;
|
||||
if (domExc) {
|
||||
console.log("An exception occured", domExc.code, domExc.message, domExc.name)
|
||||
|
@ -163,4 +161,6 @@ try{
|
|||
public AsMarkdown(): string {
|
||||
throw "AsMarkdown is not implemented by " + this.constructor.name
|
||||
}
|
||||
|
||||
protected abstract InnerConstructElement(): HTMLElement;
|
||||
}
|
Loading…
Reference in a new issue