mirror of
https://github.com/Krafpy/KSP-MGA-Planner.git
synced 2025-12-25 12:24:49 -08:00
- Reimplemented 2D orbital mechanics functions in physics-2d.ts and encaspulated inside a `Physics2D` namespace. - Deleted physics.ts and moved the required functions into physics-3d.ts Further cleaning and reimplemntation will be done on the physics-3d.ts content. - Forced consistency on error handling : every raised error throws an `Error` object. - Commented sections relative to 2D physics and sequence generation.
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
export class ErrorMessage {
|
|
constructor(id) {
|
|
this.paragraph = document.getElementById(id);
|
|
this.span = this.paragraph.getElementsByTagName("SPAN")[0];
|
|
this.hide();
|
|
}
|
|
hide() {
|
|
this.paragraph.hidden = true;
|
|
}
|
|
show(msg) {
|
|
this.span.innerHTML = msg.message;
|
|
this.paragraph.hidden = false;
|
|
}
|
|
}
|