MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / resetSession

Function resetSession

src/store/actions/sessionActions.ts:53–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 * Clears reconstruction, caches, selections, and view state.
52 */
53export function resetSession(): void {
54 // Clear all caches (including ZIP)
55 clearAllCaches();
56
57 // Clear reconstruction store
58 useReconstructionStore.getState().clear();
59 useImageMetricsStore.getState().clearSplatPsnr();
60
61 // Reset transform state
62 const transformStore = useTransformStore.getState();
63 transformStore.resetTransform();
64 transformStore.resetSplatTransform();
65
66 // Reset point picking state
67 usePointPickingStore.getState().reset();
68
69 // Clear camera selections and navigation history
70 const cameraStore = useCameraStore.getState();
71 cameraStore.setSelectedImageId(null);
72 cameraStore.clearFlyTo();
73 cameraStore.clearNavigationHistory();
74 cameraStore.clearFlyToViewState();
75
76 // Close any open modals
77 const uiStore = useUIStore.getState();
78 uiStore.closeImageDetail();
79 uiStore.closeContextMenu();
80 uiStore.closeContextMenuEditor();
81
82 // Reset view
83 uiStore.resetView();
84}
85
86/**
87 * Reset the 3D view to default camera position.

Callers

nothing calls this directly

Calls 3

clearAllCachesFunction · 0.85
resetMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected