Changed events to use pre-existing names

This commit is contained in:
PeekabooSteam
2023-08-14 23:12:14 +01:00
parent 94b8a9270d
commit 06e1cbeb7e
2 changed files with 5 additions and 7 deletions

View File

@@ -87,8 +87,8 @@ export class UnitControlPanel extends Panel {
this.hide();
// This is for when a ctrl-click happens on the map for deselection and we need to remove the selected unit from the panel
document.addEventListener( "unitDeselected", ( ev:CustomEventInit ) => {
this.getElement().querySelector( `button[data-unit-id="${ev.detail.unit.ID}"]` )?.remove();
document.addEventListener( "unitDeselection", ( ev:CustomEventInit ) => {
this.getElement().querySelector( `button[data-unit-id="${ev.detail.ID}"]` )?.remove();
});
}