Skip to content

Commit

Permalink
fix: graph edge overlaps nodes (flyteorg#542)
Browse files Browse the repository at this point in the history
* fix: upgrade react-flow-renderer version

Signed-off-by: James <[email protected]>

* fix: use setTimeout for queue on the next render

Signed-off-by: James <[email protected]>

* fix: use one state variable and fitView after nodesChange

Signed-off-by: James <[email protected]>

* fix: graph edge overlaps nodes issue

Signed-off-by: James <[email protected]>

* introduce needFitView

* edge overlap
  • Loading branch information
james-union authored Jul 20, 2022
1 parent e62b43b commit 28a224e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const ReactFlowWrapper: React.FC<RFWrapperProps> = ({
...state,
shouldUpdate: true,
nodes: rfGraphJson.nodes,
edges: rfGraphJson.edges,
edges: rfGraphJson.edges.map(edge => ({ ...edge, zIndex: 0 })),
}));
}, [rfGraphJson]);

Expand Down Expand Up @@ -109,6 +109,7 @@ export const ReactFlowWrapper: React.FC<RFWrapperProps> = ({
style={reactFlowStyle}
onInit={onLoad}
fitView
defaultEdgeOptions={{ zIndex: 0 }}
>
<Background
style={backgroundStyle.background}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export const getNestedContainerStyle = (nodeExecutionStatus) => {
const style = {
border: `1px dashed ${getStatusColor(nodeExecutionStatus)}`,
borderRadius: '8px',
background: 'rgba(255,255,255,.9)',
width: '100%',
height: '100%',
padding: '.25rem',
Expand Down

0 comments on commit 28a224e

Please sign in to comment.