fix: update arrow colors in TriggerDuplicate and TriggerConnector components

This commit is contained in:
Jerald-Golden-B 2025-06-13 19:24:28 +05:30
parent 50c516410f
commit 52301808ad
3 changed files with 7 additions and 7 deletions

View File

@ -147,7 +147,7 @@ function TriggerDuplicate() {
start={startPoint.toArray()}
end={endPoint.toArray()}
mid={midPoint.toArray()}
color={"#42a5f5"}
color={"#c4abf1"}
lineWidth={4}
dashed={true}
dashSize={0.75}
@ -157,7 +157,7 @@ function TriggerDuplicate() {
);
})}
<Arrows connections={connections} />
<Arrows connections={connections} color={'#c4abf1'} />
</group>
);
}

View File

@ -10,7 +10,7 @@ interface ConnectionLine {
trigger: TriggerSchema;
}
export function Arrows({ connections }: { readonly connections: ConnectionLine[] }) {
export function Arrows({ connections, color = "#42a5f5" }: { readonly connections: ConnectionLine[], color?: string }) {
const [hoveredLineKey, setHoveredLineKey] = useState<string | null>(null);
const groupRef = useRef<THREE.Group>(null);
const { scene } = useThree();
@ -61,7 +61,7 @@ export function Arrows({ connections }: { readonly connections: ConnectionLine[]
onPointerOut={() => setHoveredLineKey(null)}
>
<meshStandardMaterial
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : "#42a5f5"}
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : color}
/>
</mesh>
<mesh
@ -72,7 +72,7 @@ export function Arrows({ connections }: { readonly connections: ConnectionLine[]
onPointerOut={() => setHoveredLineKey(null)}
>
<meshStandardMaterial
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : "#42a5f5"}
color={toolMode === '2D-Delete' && hoveredLineKey === key ? "red" : color}
/>
</mesh>
</group>

View File

@ -477,7 +477,7 @@ function TriggerConnector() {
start={startPoint.toArray()}
end={endPoint.toArray()}
mid={midPoint.toArray()}
color={toolMode === '3D-Delete' && hoveredLineKey === connection.id ? "red" : "#42a5f5"}
color={toolMode === '3D-Delete' && hoveredLineKey === connection.id ? "red" : "#6f42c1"}
lineWidth={4}
dashed={toolMode === '3D-Delete' && hoveredLineKey === connection.id ? false : true}
dashSize={0.75}
@ -496,7 +496,7 @@ function TriggerConnector() {
);
})}
<Arrows connections={connections} />
<Arrows connections={connections} color="#6f42c1"/>
{currentLine && (
<>