fix: Use strokeOpacity and stroke color for SVG hit detection

The invisible path needs an actual stroke color (just made invisible via
strokeOpacity=0) for SVG to register pointer events on the stroke area.
Also added react-flow__edge-interaction class for consistency with the
legacy builder pattern.
This commit is contained in:
Otto
2026-02-12 09:43:16 +00:00
parent a7f9bf3cb8
commit 42b7b6ee37

View File

@@ -67,9 +67,10 @@ const CustomEdge = ({
<path
d={edgePath}
fill="none"
stroke="transparent"
stroke="black"
strokeOpacity={0}
strokeWidth={20}
className="cursor-pointer"
className="react-flow__edge-interaction cursor-pointer"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
/>