Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

feat: set the anchor points of all nodes to be enterable and exitable #918 (#1119)

balibabu0e3a877e5cda
diff --git a/web/src/pages/flow/canvas/index.tsx b/web/src/pages/flow/canvas/index.tsx
index c6be931780..c6855b9b40 100644
--- a/web/src/pages/flow/canvas/index.tsx
+++ b/web/src/pages/flow/canvas/index.tsx
@@ -1,6 +1,7 @@
import { useCallback } from 'react';
import ReactFlow, {
Background,
+ ConnectionMode,
Controls,
MarkerType,
NodeMouseHandler,
@@ -64,6 +65,7 @@ function FlowCanvas({ sideWidth, chatDrawerVisible, hideChatDrawer }: IProps) {
<div className={styles.canvasWrapper}>
<ReactFlow
ref={ref}
+ connectionMode={ConnectionMode.Loose}
nodes={nodes}
onNodesChange={onNodesChange}
onNodeContextMenu={onNodeContextMenu}
diff --git a/web/src/pages/flow/canvas/node/index.less b/web/src/pages/flow/canvas/node/index.less
index 92996613c5..54251cf29c 100644
--- a/web/src/pages/flow/canvas/node/index.less
+++ b/web/src/pages/flow/canvas/node/index.less
@@ -1,6 +1,10 @@
.textUpdaterNode {
// height: 50px;
- border: 1px solid gray;
+ box-shadow:
+ -6px 0 12px 0 rgba(179, 177, 177, 0.08),
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
+ -6px 0 16px 6px rgba(0, 0, 0, 0.05);
+
padding: 5px;
border-radius: 5px;
background: white;
diff --git a/web/src/pages/flow/canvas/node/index.tsx b/web/src/pages/flow/canvas/node/index.tsx
index c9c19c6a50..9496c63b06 100644
--- a/web/src/pages/flow/canvas/node/index.tsx
+++ b/web/src/pages/flow/canvas/node/index.tsx
@@ -18,21 +18,25 @@ export function TextUpdaterNode({
})}
>
<Handle
- type="target"
+ id="c"
+ type="source"
position={Position.Left}
isConnectable={isConnectable}
className={styles.handle}
>
{/* <PlusCircleOutlined style={{ fontSize: 10 }} /> */}
</Handle>
+ <Handle type="source" position={Position.Top} id="d" isConnectable />
<Handle
type="source"
position={Position.Right}
isConnectable={isConnectable}
className={styles.handle}
+ id="b"
>
{/* <PlusCircleOutlined style={{ fontSize: 10 }} /> */}
</Handle>
+ <Handle type="source" position={Position.Bottom} id="a" isConnectable />
<div>
<Space>
<OperatorIcon