fix(edges): don not add 0 to dom if interaction width is 0 #5426

This commit is contained in:
moklick
2025-08-07 07:19:38 +02:00
parent bb5bf60e5d
commit 71dde07e93

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}