Merge pull request #5436 from xyflow/fix/edge-interaction-width

Fix/edge interaction width
This commit is contained in:
Moritz Klack
2025-08-07 07:28:06 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Prevent a 0 added to the markup for edges when interactionWidth is 0

View File

@@ -47,7 +47,7 @@ export function BaseEdge({
return (
<>
<path {...props} d={path} fill="none" className={cc(['react-flow__edge-path', props.className])} />
{interactionWidth && (
{interactionWidth ? (
<path
d={path}
fill="none"
@@ -55,7 +55,7 @@ export function BaseEdge({
strokeWidth={interactionWidth}
className="react-flow__edge-interaction"
/>
)}
) : null}
{label && isNumeric(labelX) && isNumeric(labelY) ? (
<EdgeText
x={labelX}