Skip to content

Commit

Permalink
Fixed broken waypoint output
Browse files Browse the repository at this point in the history
  • Loading branch information
fboes committed Dec 2, 2023
1 parent 0a15e17 commit 0581ae0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion dist/Web/Components.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ export class ComponentsCheckpoints extends ComponentsOutputtable {
tfoot: document.createElement("tfoot"),
p: document.createElement("p"),
};
this.elements.table.appendChild(this.elements.caption);
this.elements.table.appendChild(this.elements.thead);
this.elements.table.appendChild(this.elements.tbody);
this.elements.table.appendChild(this.elements.tfoot);
this.appendChild(this.elements.table);
this.elements.p.className = "no-print";
this.appendChild(this.elements.p);
this.elements.caption.innerText = "Checkpoints";
Expand Down Expand Up @@ -232,7 +236,7 @@ export class ComponentsCheckpoints extends ComponentsOutputtable {
html += this.outputLine([
Outputtable.pad(i + 1, 2, 0, "0") + ".",
!isAirport
? `<input title="Waypoint #${i + 1}" data-cp-id="${i}" data-cp-prop="name" type="text" value="${c.name}" pattern="[A-Z0-9._+-]+" maxlength="8" autocapitalize="characters" required="required" />`
? `<input title="Waypoint #${i + 1}" data-cp-id="${i}" data-cp-prop="name" type="text" value="${c.name}" pattern="[A-Z0-9._+\\-]+" maxlength="8" autocapitalize="characters" required="required" />`
: c.name,
`<input title="Frequency #${i + 1}" data-cp-id="${i}" data-cp-prop="frequency_mhz" type="number" min="0.190" step="0.001" max="118" value="${c.frequency ? c.frequency_mhz : ""}" />&nbsp;MHz`,
`<input title="Altitude #${i + 1}" data-cp-id="${i}" data-cp-prop="altitude_ft" type="number" min="${!isAirportOrRunway ? -1000 : 0}" step="${!isAirportOrRunway ? 100 : 1}" value="${c.lon_lat.altitude_m ? Math.round(c.lon_lat.altitude_ft) : ""}" />&nbsp;ft`,
Expand Down
Empty file modified dist/aerofly-missions.js
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ <h4>Fligh plan help</h4>
<li>Adding a frequency to a runway will convert it into an ILS.</li>
</ul>
<p>Too sharp curves will result in the waypoint being converted from fly-by to fly-over. If you see strange lines appear on your flight plan, your waypoints may be too close or the speed is too high.</p>
<p>Use <kbd>Shift</kbd> + <kbd>Click</kbd> on the map tomove waypoints.</p>
<p>Use <kbd>Shift</kbd> + <kbd>Click</kbd> on the map to move waypoints.</p>
<button data-handler="modal-close" class="icon" title="Close flight plan help"><span>Close flight plan help</span></button>
</dialog>
<dialog id="help-navigation-modal">
Expand All @@ -367,7 +367,7 @@ <h4>Choose mission</h4>
<h4>Edit waypoint</h4>
<div>
<label for="wp-name">Name</label>
<input data-cp-prop="name" type="text" pattern="[A-Z0-9._+-]+" id="wp-name" maxlength="8" autocapitalize="characters" required="required" />
<input data-cp-prop="name" type="text" pattern="[A-Z0-9._+\-]+" id="wp-name" maxlength="8" autocapitalize="characters" required="required" />
</div>
<div class="col-2">
<div>
Expand Down
2 changes: 1 addition & 1 deletion docs/carls_homecoming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Your flights:
1. [Crossing to Sweden](./03_crossing_to_sweden.md)
1. [Letters to America](./04_letters_to_america.md)
1. [The Swedish Hinterlands](./05_the_swedish_hinterlands.md)
1. [The Lake where Gripens play](./05_the_swedish_hinterlands.md)
1. [The Lake where Gripens play](./06_the_lake_where_gripens_play.md)
1. [Carl's Toyland](./07_carls_toyland.md)
1. [Outskirts of Stockholm](./08_outskirts_of_stockholm.md)
1. [Finally! Stockholm!](./09_finally_stockholm.md)
Expand Down
6 changes: 5 additions & 1 deletion src/Web/Components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ export class ComponentsCheckpoints extends ComponentsOutputtable {

constructor() {
super();
this.elements.table.appendChild(this.elements.caption);
this.elements.table.appendChild(this.elements.thead);
this.elements.table.appendChild(this.elements.tbody);
this.elements.table.appendChild(this.elements.tfoot);
this.appendChild(this.elements.table);
this.elements.p.className = "no-print";
this.appendChild(this.elements.p);
this.elements.caption.innerText = "Checkpoints";
Expand Down Expand Up @@ -293,7 +297,7 @@ export class ComponentsCheckpoints extends ComponentsOutputtable {
!isAirport
? `<input title="Waypoint #${i + 1}" data-cp-id="${i}" data-cp-prop="name" type="text" value="${
c.name
}" pattern="[A-Z0-9._+-]+" maxlength="8" autocapitalize="characters" required="required" />`
}" pattern="[A-Z0-9._+\\-]+" maxlength="8" autocapitalize="characters" required="required" />`
: c.name,
`<input title="Frequency #${
i + 1
Expand Down

0 comments on commit 0581ae0

Please sign in to comment.