Skip to content

Commit b68ac61

Browse files
authored
Merge pull request #3 from vikadata/fix/edge-render
fix: target edge invisible if source invisible
2 parents c605107 + 3b50b12 commit b68ac61

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/container/EdgeRenderer/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,7 @@ const Edge = ({
103103
const sourcePosition = sourceHandle ? sourceHandle.position : Position.Bottom;
104104
const targetPosition = targetHandle ? targetHandle.position : Position.Top;
105105

106-
if (!sourceHandle) {
107-
// console.warn(`couldn't create edge for source handle id: ${sourceHandleId}; edge id: ${edge.id}`);
108-
return null;
109-
}
110-
111-
if (!targetHandle) {
112-
// console.warn(`couldn't create edge for target handle id: ${targetHandleId}; edge id: ${edge.id}`);
106+
if ((!sourceHandle || !targetHandle) && !onlyRenderVisibleElements) {
113107
return null;
114108
}
115109

0 commit comments

Comments
 (0)