Fix ShipWindow selection interactions
This commit is contained in:
@@ -102,6 +102,7 @@ export class GameApp {
|
||||
private readonly fleetWindowTitleEl: HTMLHeadingElement;
|
||||
private readonly debugWindowEl: HTMLDivElement;
|
||||
private readonly sessionActionsEl: HTMLDivElement;
|
||||
private lastShipWindowMarkup = "";
|
||||
private universe: UniverseDefinition;
|
||||
|
||||
constructor(container: HTMLElement) {
|
||||
@@ -2123,7 +2124,11 @@ export class GameApp {
|
||||
this.ordersEl.dataset.mode = this.selectedStation ? "station" : this.selection.length > 0 ? "ships" : "none";
|
||||
this.fleetWindowEl.dataset.open = this.windowState["fleet-command"] ? "true" : "false";
|
||||
this.fleetWindowTitleEl.textContent = "Ships";
|
||||
this.fleetWindowBodyEl.innerHTML = getShipWindowMarkup(this.ships, this.selection);
|
||||
const shipWindowMarkup = getShipWindowMarkup(this.ships, this.selection);
|
||||
if (shipWindowMarkup !== this.lastShipWindowMarkup) {
|
||||
this.fleetWindowBodyEl.innerHTML = shipWindowMarkup;
|
||||
this.lastShipWindowMarkup = shipWindowMarkup;
|
||||
}
|
||||
this.debugWindowEl.dataset.open = this.windowState.debug ? "true" : "false";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user