MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / hasUrlToLoad

Function hasUrlToLoad

src/store/reconstructionStore.ts:86–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84 * Also detects inline manifest format (flag bit 2 set in #d=... data).
85 */
86export function hasUrlToLoad(): boolean {
87 if (typeof window === 'undefined') return false;
88
89 // Hash format: #d=...
90 const hash = window.location.hash;
91 if (hash) {
92 const hashContent = hash.startsWith('#') ? hash.slice(1) : hash;
93 const hashParams = new URLSearchParams(hashContent);
94 if (hashParams.get('d')) return true;
95 }
96
97 // Legacy query format: ?url=...
98 const searchParams = new URLSearchParams(window.location.search);
99 if (searchParams.get('url')) return true;
100
101 return false;
102}
103
104// Pre-compute at module load to show loading indicator immediately
105const initialUrlLoading = hasUrlToLoad();

Callers 2

useDropZoneStoreFacadeFunction · 0.90

Calls 1

getMethod · 0.80

Tested by

no test coverage detected