From 28be29ecde63c173a1efb23172cdc1648d1d53ad Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 24 Oct 2023 18:26:58 +0800 Subject: [PATCH 1/4] :bug: fix: readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6019dd..5fa545f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

-

Pro Flow Editor

+

Pro Flow

From 5690b94651f89f01d90994d6c5ab7305504cd253 Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 24 Oct 2023 18:29:26 +0800 Subject: [PATCH 2/4] :bug: fix: readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bc264e..dd7170e 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ ## 简介 -Pro Flow Editor 是一款基于 react-flow 构建的画布编辑器。具有的特性如下: +Pro Flow 是一款基于 react-flow 构建的画布编辑器。具有的特性如下: - 🎨 **自定义节点类型**:用户可以通过传入自定义 React 组件的方式创建不同类型的节点,从而满足不同的业务需求; - 🎉 **灵活的事件处理**:支持用户对节点的拖拽、连接、删除等事件进行自定义处理,满足不同业务场景的需求; From 8ca6796b5a987ade3bae5bed274dac0c85266701 Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 24 Oct 2023 22:39:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?:sparkles:=20feat:=20=E6=96=B0=E5=A2=9Egrou?= =?UTF-8?q?p=E8=8A=82=E7=82=B9width,height?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ProFlow/constants.tsx | 2 ++ src/ProFlow/helper.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ProFlow/constants.tsx b/src/ProFlow/constants.tsx index 49369b0..1f1a2d2 100644 --- a/src/ProFlow/constants.tsx +++ b/src/ProFlow/constants.tsx @@ -24,6 +24,8 @@ export interface NodeMapItem { title?: string; group?: boolean; des?: string; + width?: number; + height?: number; danger?: boolean; dangerCount?: number; type?: 'input' | 'output' | 'default'; diff --git a/src/ProFlow/helper.tsx b/src/ProFlow/helper.tsx index 29f480c..30c38e1 100644 --- a/src/ProFlow/helper.tsx +++ b/src/ProFlow/helper.tsx @@ -37,6 +37,8 @@ export function convertMappingFrom(nodes: ProFlowNode[], edges: ProFlowEdge[], z mapping[node.id] = { id: node.id, group: node.group, + width: node.group ? 355 : 322, + height: node.group ? 1100 : 85, data: node.data, select: node.select, right: [], From 1572e30fe811fafdbcf79870e501f6c9ac0bf2c8 Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 24 Oct 2023 23:52:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?:bug:=20fix:=20=E4=BF=AE=E5=A4=8DrenderNode?= =?UTF-8?q?=E7=9A=84width?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ProFlow/constants.tsx | 2 -- src/ProFlow/helper.tsx | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ProFlow/constants.tsx b/src/ProFlow/constants.tsx index 1f1a2d2..49369b0 100644 --- a/src/ProFlow/constants.tsx +++ b/src/ProFlow/constants.tsx @@ -24,8 +24,6 @@ export interface NodeMapItem { title?: string; group?: boolean; des?: string; - width?: number; - height?: number; danger?: boolean; dangerCount?: number; type?: 'input' | 'output' | 'default'; diff --git a/src/ProFlow/helper.tsx b/src/ProFlow/helper.tsx index 30c38e1..5504ccc 100644 --- a/src/ProFlow/helper.tsx +++ b/src/ProFlow/helper.tsx @@ -37,8 +37,6 @@ export function convertMappingFrom(nodes: ProFlowNode[], edges: ProFlowEdge[], z mapping[node.id] = { id: node.id, group: node.group, - width: node.group ? 355 : 322, - height: node.group ? 1100 : 85, data: node.data, select: node.select, right: [], @@ -182,8 +180,8 @@ export const getRenderData = ( id: node.id!, position: { x: 0, y: 0 }, type: getTypeFromEdge(node), - width: 320, - height: 83, + width: node.group ? 355 : 320, + height: node.group ? 1100 : 83, className: cx(INIT_NODE), data: { label: node.group ? (