feat(frontend): implement via mode for setting routes with waypoints

This commit is contained in:
2025-08-09 19:57:04 +02:00
parent cd1cc6dc5f
commit ef57bf4cde
2 changed files with 51 additions and 66 deletions

View File

@@ -67,14 +67,11 @@ export const MapNode: React.FC<MapNodeProps> = ({
onDragEnd?.(e);
};
const nodeColor = security !== undefined
? getSecurityColor(security)
: '#a855f7'; // fallback purple color
const nodeColor = security !== undefined ? getSecurityColor(security) : '#a855f7';
if (type === 'region') {
// Further reduce region size to prevent overlap - made even smaller
const pillWidth = Math.max(name.length * 5, 40); // Reduced from 8 to 5, min from 60 to 40
const pillHeight = 18; // Reduced from 24 to 18
const pillWidth = Math.max(name.length * 5, 40);
const pillHeight = 18;
return (
<g
@@ -131,9 +128,8 @@ export const MapNode: React.FC<MapNodeProps> = ({
</g>
);
} else {
// Render system as a dot with external label
const nodeSize = 6;
const textOffset = 20; // Position text below the dot - moved down more
const textOffset = 20;
return (
<g
@@ -144,7 +140,7 @@ export const MapNode: React.FC<MapNodeProps> = ({
onMouseDown={handleMouseDown}
onClick={(e) => {
e.stopPropagation();
if (!disableNavigate) onClick();
onClick();
}}
onDoubleClick={(e) => {
e.stopPropagation();