diff --git a/frontend/src/components/MapNode.tsx b/frontend/src/components/MapNode.tsx index 3f0a132..ff3cc10 100644 --- a/frontend/src/components/MapNode.tsx +++ b/frontend/src/components/MapNode.tsx @@ -208,61 +208,85 @@ export const MapNode: React.FC = ({ {security.toFixed(1)} )} - - {signatures !== undefined && signatures > 0 && `📡 ${signatures}`} - - {/* Statistics display - fixed visual size regardless of zoom */} - {showJumps && jumps !== undefined && ( - - 🚀 {jumps} - - )} - - {showKills && kills !== undefined && ( - - ⚔️ {kills} - - )} + {/* Dynamic text positioning based on what's shown */} + {(() => { + let currentY = textOffset + 15; + const textElements = []; + + // Add signatures if present + if (signatures !== undefined && signatures > 0) { + textElements.push( + + 📡 {signatures} + + ); + currentY += 15; + } + + // Add jumps if enabled and present + if (showJumps && jumps !== undefined) { + textElements.push( + + 🚀 {jumps} + + ); + currentY += 15; + } + + // Add kills if enabled and present + if (showKills && kills !== undefined) { + textElements.push( + + ⚔️ {kills} + + ); + } + + return textElements; + })()} ); } diff --git a/frontend/src/components/StatisticsToggle.tsx b/frontend/src/components/StatisticsToggle.tsx index 79b8084..bb1e6c5 100644 --- a/frontend/src/components/StatisticsToggle.tsx +++ b/frontend/src/components/StatisticsToggle.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { Switch } from '@/components/ui/switch'; interface StatisticsToggleProps { jumpsEnabled: boolean; @@ -15,28 +14,30 @@ export const StatisticsToggle: React.FC = ({ onKillsToggle, }) => { return ( -
-
-
- - -
-
- - -
+
+
+ +
);