forked from MapComplete/MapComplete
Fix deployment, fix documentation generation, add a small markdown generator
This commit is contained in:
parent
e480c97676
commit
8e72b70742
27 changed files with 478 additions and 399 deletions
|
@ -26,17 +26,7 @@ export default abstract class BaseUIElement {
|
|||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public IsHovered(): UIEventSource<boolean> {
|
||||
if (this._onHover !== undefined) {
|
||||
return this._onHover;
|
||||
}
|
||||
// Note: we just save it. 'Update' will register that an eventsource exist and install the necessary hooks
|
||||
this._onHover = new UIEventSource<boolean>(false);
|
||||
return this._onHover;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AttachTo(divId: string) {
|
||||
let element = document.getElementById(divId);
|
||||
if (element === null) {
|
||||
|
@ -84,6 +74,10 @@ export default abstract class BaseUIElement {
|
|||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public HasClass(clss: string): boolean{
|
||||
return this.clss.has(clss)
|
||||
}
|
||||
|
||||
public SetStyle(style: string): BaseUIElement {
|
||||
this.style = style;
|
||||
|
@ -156,4 +150,8 @@ export default abstract class BaseUIElement {
|
|||
|
||||
return el
|
||||
}
|
||||
|
||||
public AsMarkdown(): string{
|
||||
throw "AsMarkdown is not implemented by "+this.constructor.name
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue