mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: Fixed the issue where the operator added by clicking the plus sign in the data flow would overlap with the original section #9886 (#10458)
### What problem does this PR solve? Fix: Fixed the issue where the operator added by clicking the plus sign in the data flow would overlap with the original section #9886 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -178,11 +178,17 @@ function DataFlowCanvas({ drawerVisible, hideDrawer, showLogSheet }: IProps) {
|
||||
};
|
||||
|
||||
const onConnectEnd: OnConnectEnd = (event, connectionState) => {
|
||||
const target = event.target as HTMLElement;
|
||||
const nodeId = connectionState.fromNode?.id;
|
||||
|
||||
// Events triggered by Handle are directly interrupted
|
||||
if (connectionState.toNode !== null || (nodeId && hasChildNode(nodeId))) {
|
||||
if (
|
||||
target?.classList.contains('react-flow__handle') ||
|
||||
(nodeId && hasChildNode(nodeId))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ('clientX' in event && 'clientY' in event) {
|
||||
const { clientX, clientY } = event;
|
||||
setDropdownPosition({ x: clientX, y: clientY });
|
||||
|
||||
Reference in New Issue
Block a user