Skip to content

Commit ea2798e

Browse files
authored
Merge pull request #369 from reaviz/anton/ring-highlight-fix
Remove hover on invisible rings
2 parents 61ec5d5 + bea57ed commit ea2798e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/symbols/Ring.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ export const Ring: FC<RingProps> = ({
7474

7575
return (
7676
<Billboard position={[0, 0, 1]}>
77-
<a.mesh scale={ringSize as any}>
77+
<a.mesh
78+
scale={ringSize as any}
79+
// Disabling raycast/pointer events when ring is invisible (opacity = 0)
80+
// This prevents invisible rings highlighting parent nodes when hovered over
81+
raycast={opacity > 0 ? undefined : () => []}
82+
>
7883
<ringGeometry
7984
attach="geometry"
8085
args={[innerRadius, outerRadius, segments]}

0 commit comments

Comments
 (0)