mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
26 lines
502 B
TypeScript
26 lines
502 B
TypeScript
export class Panel {
|
|
#element: HTMLElement
|
|
#visible: boolean = true;
|
|
|
|
constructor(ID: string) {
|
|
this.#element = <HTMLElement>document.getElementById(ID);
|
|
}
|
|
|
|
show() {
|
|
this.#element.classList.toggle("hide", false);
|
|
this.#visible = true;
|
|
}
|
|
|
|
hide() {
|
|
this.#element.classList.toggle("hide", true);
|
|
this.#visible = false;
|
|
}
|
|
|
|
getElement() {
|
|
return this.#element;
|
|
}
|
|
|
|
getVisible(){
|
|
return this.#visible;
|
|
}
|
|
} |