Skip to content

Commit

Permalink
fix(pipeline-builder): fix newly added nodes is behind old nodes (#939)
Browse files Browse the repository at this point in the history
Because

- fix newly added nodes is behind old nodes

This commit

- fix newly added nodes is behind old nodes
  • Loading branch information
EiffelFly committed Feb 7, 2024
1 parent 31ea1c6 commit 6824bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/toolkit/src/view/pipeline-builder/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export const Flow = React.forwardRef<HTMLDivElement, FlowProps>(

console.warn(msg);
}}
elevateNodesOnSelect={true}
selectionOnDrag={true}
>
<Controls
id={pipelineName ?? undefined}
Expand Down
5 changes: 3 additions & 2 deletions packages/toolkit/src/view/pipeline-builder/FlowControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ export const FlowControl = (props: FlowControlProps) => {
throw new Error("Component type is not defined");
}

console.log(resource);

if ("configuration" in resource) {
// Create a new array to let reactflow rerender the component
newNodes = [
Expand Down Expand Up @@ -474,6 +472,7 @@ export const FlowControl = (props: FlowControlProps) => {
x: viewport.x,
y: viewport.y,
}),
zIndex: 20,
},
];
} else {
Expand All @@ -499,6 +498,7 @@ export const FlowControl = (props: FlowControlProps) => {
note: null,
},
position: newNodeXY,
zIndex: 20,
},
];
}
Expand All @@ -525,6 +525,7 @@ export const FlowControl = (props: FlowControlProps) => {
note: null,
},
position: newNodeXY,
zIndex: 20,
},
];
}
Expand Down

0 comments on commit 6824bb1

Please sign in to comment.