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
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Prevent a 0 added to the markup for edges when interactionWidth is 0
@@ -47,7 +47,7 @@ export function BaseEdge({
return ( return (
<> <>
<path {...props} d={path} fill="none" className={cc(['react-flow__edge-path', props.className])} /> <path {...props} d={path} fill="none" className={cc(['react-flow__edge-path', props.className])} />
{interactionWidth && ( {interactionWidth ? (
<path <path
d={path} d={path}
fill="none" fill="none"
@@ -55,7 +55,7 @@ export function BaseEdge({
strokeWidth={interactionWidth} strokeWidth={interactionWidth}
className="react-flow__edge-interaction" className="react-flow__edge-interaction"
/> />
)} ) : null}
{label && isNumeric(labelX) && isNumeric(labelY) ? ( {label && isNumeric(labelX) && isNumeric(labelY) ? (
<EdgeText <EdgeText
x={labelX} x={labelX}