main
mula.liu 2025-12-28 10:45:34 +08:00
parent 246ae12287
commit e720d656da
1 changed files with 5 additions and 4 deletions

View File

@ -18,8 +18,9 @@ export function ProbeList({ probes, planets, onBodySelect, selectedBody, onReset
// Auto-expand the group when a body is selected from the 3D scene
useEffect(() => {
if (selectedBody) {
// Auto-collapse panel for focus mode
setIsCollapsed(true);
// Don't auto-collapse panel if it's already open
// Only auto-collapse if panel was already collapsed
// This allows users to keep the panel open while browsing bodies
// Auto-expand the group that contains the selected body
setExpandedGroup(selectedBody.type);
@ -114,10 +115,10 @@ export function ProbeList({ probes, planets, onBodySelect, selectedBody, onReset
<span className="w-1 h-4 bg-[#238636] rounded-full"></span>
</h2>
<button
<button
onClick={() => {
onBodySelect(null);
onResetCamera();
onBodySelect(null);
}}
className="text-[10px] bg-white/5 hover:bg-white/10 px-2 py-1 rounded text-gray-400 hover:text-white transition-colors border border-white/5"
>