fix: stop globe auto-rotation on point click

Rotation continued while browsing stations, making selection impossible.
Now stops immediately when clicking any radio point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-06 01:18:35 +01:00
parent 9ac1034e5e
commit c41138f62a

View file

@ -99,6 +99,9 @@ export default function RadioTab({ data }: { data: any }) {
setShowFavorites(false); setShowFavorites(false);
setStationsLoading(true); setStationsLoading(true);
setStations([]); setStations([]);
// Stop auto-rotation on point click so user can browse stations
const controls = globeRef.current?.controls() as any;
if (controls) controls.autoRotate = false;
if (globeRef.current) { if (globeRef.current) {
// Radio Garden geo format: [lng, lat] // Radio Garden geo format: [lng, lat]
globeRef.current.pointOfView({ lat: point.geo[1], lng: point.geo[0], altitude: 0.4 }, 800); globeRef.current.pointOfView({ lat: point.geo[1], lng: point.geo[0], altitude: 0.4 }, 800);