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

Function clearTransientState

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

Source from the content-addressed store, hash-verified

121 * Useful for preparing to load a new reconstruction while keeping UI settings.
122 */
123export function clearTransientState(): void {
124 // Clear camera selection and navigation
125 const cameraStore = useCameraStore.getState();
126 cameraStore.setSelectedImageId(null);
127 cameraStore.clearFlyTo();
128 cameraStore.clearNavigationHistory();
129 cameraStore.clearFlyToViewState();
130
131 // Reset point picking
132 usePointPickingStore.getState().reset();
133
134 // Reset transform
135 const transformStore = useTransformStore.getState();
136 transformStore.resetTransform();
137 transformStore.resetSplatTransform();
138
139 // Close modals
140 const uiStore = useUIStore.getState();
141 uiStore.closeImageDetail();
142 uiStore.closeContextMenu();
143}
144
145/**
146 * Close all open modals and popups.

Callers

nothing calls this directly

Calls 1

resetMethod · 0.80

Tested by

no test coverage detected