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:
parent
9ac1034e5e
commit
c41138f62a
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue