diff --git a/frontend/react/src/map/markers/temporaryunitmarker.ts b/frontend/react/src/map/markers/temporaryunitmarker.ts index a56ea45b..3b310a81 100644 --- a/frontend/react/src/map/markers/temporaryunitmarker.ts +++ b/frontend/react/src/map/markers/temporaryunitmarker.ts @@ -1,5 +1,5 @@ import { CustomMarker } from "./custommarker"; -import { DivIcon, LatLng } from "leaflet"; +import { DivIcon, LatLng, LatLngExpression } from "leaflet"; import { SVGInjector } from "@tanem/svg-injector"; import { getApp } from "../../olympusapp"; import { adjustBrightness, normalizeAngle, rad2deg } from "../../other/utils"; @@ -43,6 +43,14 @@ export class TemporaryUnitMarker extends CustomMarker { }, 1000); } + setLatLng(latlng: LatLngExpression): this { + super.setLatLng(latlng); + if (this.#acquisitionCircle) this.#acquisitionCircle.setLatLng(latlng); + if (this.#engagementCircle) this.#engagementCircle.setLatLng(latlng); + + return this; + } + createIcon() { const blueprint = getApp().getUnitsManager().getDatabase().getByName(this.#name);