Skip to content

Commit

Permalink
🐛 fix: 修复renderNode的width
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangchu committed Oct 24, 2023
1 parent 8ca6796 commit 1572e30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/ProFlow/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 2 additions & 4 deletions src/ProFlow/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down Expand Up @@ -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 ? (
Expand Down

0 comments on commit 1572e30

Please sign in to comment.