Merge pull request #5436 from xyflow/fix/edge-interaction-width
Fix/edge interaction width
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user