fix(react): allow edges to start from 0,0 (#3980)

This commit is contained in:
Moritz Klack
2024-03-05 16:49:36 +01:00
committed by GitHub
parent 513e1fe71d
commit 64e240e7a5
2 changed files with 2 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
- unify `Edge` and `Node` type handling
- fix safari: prevent selection of viewport
- fix `useNodesData` hook to prevent re-renderings
- fix edges: allow start at 0,0
## 12.0.0-next.10

View File

@@ -111,7 +111,7 @@ export function EdgeWrapper<EdgeType extends Edge = Edge>({
[edge.markerEnd, rfId]
);
if (edge.hidden || !sourceX || !sourceY || !targetX || !targetY) {
if (edge.hidden || sourceX === null || sourceY === null || targetX === null || targetY === null) {
return null;
}