Grouped units can be deleted now

Also added some performance optimizations on drawing of selected units and removed destination preview icon for single unit selection
This commit is contained in:
Pax1601
2023-11-22 13:12:35 +01:00
parent 3ffeed3b39
commit d3f8d4eff7
12 changed files with 172 additions and 158 deletions

View File

@@ -36,17 +36,9 @@ export class Weapon extends CustomMarker {
super(new LatLng(0, 0), { riseOnHover: true, keyboard: false });
this.ID = ID;
/* Deselect units if they are hidden */
document.addEventListener("toggleCoalitionVisibility", (ev: CustomEventInit) => {
window.setTimeout(() => { !this.getHidden() }, 300);
});
document.addEventListener("toggleUnitVisibility", (ev: CustomEventInit) => {
window.setTimeout(() => { !this.getHidden() }, 300);
});
document.addEventListener("mapVisibilityOptionsChanged", (ev: CustomEventInit) => {
/* Update the marker when the options change */
document.addEventListener("mapOptionsChanged", (ev: CustomEventInit) => {
this.#updateMarker();
});
}