Range rings only showing when necessary

This commit is contained in:
PeekabooSteam
2023-10-18 12:13:51 +01:00
parent 8e545346e6
commit 1691b0b30c
2 changed files with 17 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ export class MapContextMenu extends ContextMenu {
#groundUnitSpawnMenu: GroundUnitSpawnMenu;
#navyUnitSpawnMenu: NavyUnitSpawnMenu;
#coalitionArea: CoalitionArea | null = null;
#selectedUnitCategory: string = "";
/**
*
@@ -39,9 +40,10 @@ export class MapContextMenu extends ContextMenu {
/* Event listeners */
document.addEventListener("mapContextMenuShow", (e: any) => {
if (this.getVisibleSubMenu() !== e.detail.type)
if (this.getVisibleSubMenu() !== e.detail.type) {
this.#showSubMenu(e.detail.type);
else
this.#selectedUnitCategory = e.detail.type;
} else
this.#hideSubMenus(e.detail.type);
});