Add region security and coloring
Add security field to region data and implement color-coding.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { getSecurityColor } from '../utils/securityColors';
|
||||
|
||||
@@ -25,12 +24,10 @@ export const MapNode: React.FC<MapNodeProps> = ({
|
||||
}) => {
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
|
||||
// Use security-based color for systems, default colors for regions
|
||||
const nodeColor = type === 'system' && security !== undefined
|
||||
// Use security-based color for both systems and regions
|
||||
const nodeColor = security !== undefined
|
||||
? getSecurityColor(security)
|
||||
: type === 'region'
|
||||
? (isHovered ? '#8b5cf6' : '#a855f7')
|
||||
: (isHovered ? '#06b6d4' : '#0891b2');
|
||||
: '#a855f7'; // fallback purple color
|
||||
|
||||
if (type === 'region') {
|
||||
// Render region as a pill/rounded rectangle
|
||||
|
||||
Reference in New Issue
Block a user