fix: update arrow colors in TriggerDuplicate and TriggerConnector components
This commit is contained in:
parent
50c516410f
commit
52301808ad
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 && (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue