feat: Implement interactive map views
Create interactive map views using SVG for nodes and connections. Implement navigation to region and system pages on click.
This commit is contained in:
37
src/components/Connection.tsx
Normal file
37
src/components/Connection.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
interface ConnectionProps {
|
||||
from: { x: number; y: number };
|
||||
to: { x: number; y: number };
|
||||
}
|
||||
|
||||
export const Connection: React.FC<ConnectionProps> = ({ from, to }) => {
|
||||
return (
|
||||
<g>
|
||||
{/* Glow effect */}
|
||||
<line
|
||||
x1={from.x}
|
||||
y1={from.y}
|
||||
x2={to.x}
|
||||
y2={to.y}
|
||||
stroke="#8b5cf6"
|
||||
strokeWidth="3"
|
||||
opacity="0.3"
|
||||
filter="url(#glow)"
|
||||
/>
|
||||
|
||||
{/* Main line */}
|
||||
<line
|
||||
x1={from.x}
|
||||
y1={from.y}
|
||||
x2={to.x}
|
||||
y2={to.y}
|
||||
stroke="#a855f7"
|
||||
strokeWidth="1"
|
||||
opacity="0.7"
|
||||
className="transition-all duration-300"
|
||||
/>
|
||||
</g>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user