mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: The delete button is displayed only when the cursor is hovered over the connection line #3221 (#8422)
### What problem does this PR solve? Feat: The delete button is displayed only when the cursor is hovered over the connection line #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -466,3 +466,23 @@ export function getAgentNodeTools(agentNode?: RAGFlowNodeType) {
|
||||
const tools: IAgentForm['tools'] = get(agentNode, 'data.form.tools', []);
|
||||
return tools;
|
||||
}
|
||||
|
||||
export function mapEdgeMouseEvent(
|
||||
edges: Edge[],
|
||||
edgeId: string,
|
||||
isHovered: boolean,
|
||||
) {
|
||||
const nextEdges = edges.map((element) =>
|
||||
element.id === edgeId
|
||||
? {
|
||||
...element,
|
||||
data: {
|
||||
...element.data,
|
||||
isHovered,
|
||||
},
|
||||
}
|
||||
: element,
|
||||
);
|
||||
|
||||
return nextEdges;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user