diff --git a/src/App.jsx b/src/App.jsx index 96239a0..2970a5e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -93,9 +93,13 @@ export default function App() { }, [playAnim]); const appStartRef = useRef(Date.now()); + const lastSwitchRef = useRef(0); const handleZoomOut = useCallback(() => { - // 起動後15秒は切り替え無効 - if (Date.now() - appStartRef.current < 15000) return; + const now = Date.now(); + // 起動後15秒、または切り替え後5秒はブロック + if (now - appStartRef.current < 15000) return; + if (now - lastSwitchRef.current < 5000) return; + lastSwitchRef.current = now; setView('nasa'); }, []); @@ -134,9 +138,9 @@ export default function App() { {/* NASA center button */} {isNasa && (