Added unit marker to database and implemented better grouping

This commit is contained in:
Pax1601
2023-11-14 17:43:24 +01:00
parent e3423ea9a3
commit 25e2c50438
20 changed files with 785 additions and 423 deletions

View File

@@ -68,6 +68,7 @@ export class Map extends L.Map {
#temporaryMarkers: TemporaryUnitMarker[] = [];
#selecting: boolean = false;
#isZooming: boolean = false;
#previousZoom: number = 0;
#destinationGroupRotation: number = 0;
#computeDestinationRotation: boolean = false;
@@ -501,6 +502,10 @@ export class Map extends L.Map {
return this.#visibilityOptions;
}
getPreviousZoom() {
return this.#previousZoom;
}
/* Event handlers */
#onClick(e: any) {
if (!this.#preventLeftClick) {
@@ -701,6 +706,7 @@ export class Map extends L.Map {
}
#onZoomStart(e: any) {
this.#previousZoom = this.getZoom();
if (this.#centerUnit != null)
this.#panToUnit(this.#centerUnit);
this.#isZooming = true;