added close aircraft button

This commit is contained in:
PxlLoewe
2025-04-14 19:05:11 -07:00
parent 8fec22de2c
commit d0c779b66e
2 changed files with 14 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import { DivIcon, Marker as LMarker, Popup as LPopup } from "leaflet";
import { useMapStore } from "_store/mapStore";
import { Fragment, useCallback, useEffect, useRef, useState } from "react";
import { cn } from "helpers/cn";
import { House, Route } from "lucide-react";
import { Cross, House, Minimize2, Route } from "lucide-react";
export const FMS_STATUS_COLORS: { [key: string]: string } = {
"0": "rgb(126,0,5)",
@@ -241,7 +241,19 @@ const AircraftLabel = ({ aircraft }: { aircraft: Aircraft }) => {
anchor.includes("left") && "-translate-x-1/2",
anchor.includes("top") && "-translate-y-1/2",
)}
></div>
/>
<div
className="absolute p-1 z-99 top-0 right-0 transform -translate-y-full bg-base-100 cursor-pointer"
onClick={() => {
setOpenAircraftMarker({
open: [],
close: [aircraft.id],
});
}}
>
<Minimize2 className="text-white " size={15} />
</div>
<div
className={cn(
"absolute w-[calc(100%+2px)] h-4 z-99",

Binary file not shown.