From 78c655e2f7539025054e5a59a47e6278a8f75b28 Mon Sep 17 00:00:00 2001 From: Davide Passoni Date: Mon, 31 Mar 2025 15:59:27 +0200 Subject: [PATCH] feat: Added threat rings to spawn tool --- frontend/react/src/map/markers/temporaryunitmarker.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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);