From 5c757e82557e143e4db78df92cc554f51013643f Mon Sep 17 00:00:00 2001 From: achichenkov Date: Thu, 9 Jan 2025 15:50:03 +0300 Subject: [PATCH] fix(Map): Fixed dbclick behaviour --- .../SolarSystemNode/SolarSystemNode.tsx | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/assets/js/hooks/Mapper/components/map/components/SolarSystemNode/SolarSystemNode.tsx b/assets/js/hooks/Mapper/components/map/components/SolarSystemNode/SolarSystemNode.tsx index 50f6ff28..fb58e98f 100644 --- a/assets/js/hooks/Mapper/components/map/components/SolarSystemNode/SolarSystemNode.tsx +++ b/assets/js/hooks/Mapper/components/map/components/SolarSystemNode/SolarSystemNode.tsx @@ -6,7 +6,6 @@ import clsx from 'clsx'; import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; import { useMapGetOption } from '@/hooks/Mapper/mapRootProvider/hooks/api'; - import { EFFECT_BACKGROUND_STYLES, LABELS_INFO, @@ -77,11 +76,9 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps visibleNodes.has(id), [id, visibleNodes]); const charactersInSystem = useMemo(() => { - return characters - .filter(c => c.location?.solar_system_id === solar_system_id) - .filter(c => c.online); - }, [characters, presentCharacters, solar_system_id]); + return characters.filter(c => c.location?.solar_system_id === solar_system_id).filter(c => c.online); + }, [characters, solar_system_id]); const isWormhole = isWormholeSpace(system_class); const classTitleColor = useMemo( @@ -190,7 +185,6 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps )}
{visible && ( @@ -211,9 +205,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps {tag != null && tag !== '' && ( -
- {tag} -
+
{tag}
)}
- {customName && ( -
- {customName} -
- )} + {customName &&
{customName}
} {!isWormhole && !customName &&
{region_name}
} {isWormhole && !customName &&
}
- {locked && ( - - )} + {locked && } {hubs.includes(solar_system_id.toString()) && ( )} @@ -259,7 +245,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps @@ -287,7 +273,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps )} -
+