From b2330f2b35601fb930ffe9c55091aaafc91ac3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Tue, 14 Feb 2023 16:57:06 +0100 Subject: [PATCH] Parse and add handle directions fixes #1, which is caused by having multiple handles in the custom nodes but missing handle specs in the edges --- package.json | 2 +- src/components/Flow/FileNode.tsx | 13 ++++++++++--- src/components/Flow/LinkNode.tsx | 15 +++++++++++---- src/components/Flow/MarkdownNode.tsx | 14 +++++++++++--- src/components/Flow/index.tsx | 1 + src/utils/index.ts | 2 ++ 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 56be9a9..20a4c37 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-markdown": "^8.0.4", - "reactflow": "^11.4.0", + "reactflow": "^11.5.0", "swr": "^2.0.0", "typescript": "4.9.4" }, diff --git a/src/components/Flow/FileNode.tsx b/src/components/Flow/FileNode.tsx index 39c7864..0a0af5e 100644 --- a/src/components/Flow/FileNode.tsx +++ b/src/components/Flow/FileNode.tsx @@ -19,10 +19,10 @@ const FileNode: FC = memo(({ data, isConnectable }: any) => { return ( <> console.log("handle onConnect", params)} isConnectable={isConnectable} /> {type === "image" && ( @@ -47,16 +47,23 @@ const FileNode: FC = memo(({ data, isConnectable }: any) => { /> )} + diff --git a/src/components/Flow/LinkNode.tsx b/src/components/Flow/LinkNode.tsx index 9a945b8..187b47a 100644 --- a/src/components/Flow/LinkNode.tsx +++ b/src/components/Flow/LinkNode.tsx @@ -5,24 +5,31 @@ const LinkNode: FC = memo(({ data, isConnectable }: any) => { return ( <> console.log("handle onConnect", params)} isConnectable={isConnectable} />