- more addition bugfixes

This commit is contained in:
2025-11-04 15:29:48 +00:00
parent 61894c0c42
commit c127ce8a8c
9 changed files with 87 additions and 62 deletions

View File

@@ -159,14 +159,27 @@ export function getHotlistName(obj: HotlistMatches | undefined) {
export const getNPEDCategory = (r?: SightingType | null) =>
r?.metadata?.npedJSON?.["NPED CATEGORY"] as "A" | "B" | "C" | "D" | undefined;
export const zoomMapping = (zoomLevel: number) => {
export const zoomMapping = (zoomLevel: number | undefined) => {
switch (zoomLevel) {
case 1:
return "Far";
return "Near";
case 2:
return "Medium";
return "Mid";
case 4:
return "Close";
return "Far";
default:
break;
}
};
export const reverseZoomMapping = (magnification: string) => {
switch (magnification) {
case "near":
return 1;
case "mid":
return 2;
case "far":
return 4;
default:
break;
}