Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jan 2, 2025
1 parent 866d015 commit 41b107d
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 127 deletions.
12 changes: 5 additions & 7 deletions products/jbrowse-web/src/SessionLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,13 @@ const SessionLoader = types
async fetchConfig() {
// @ts-expect-error
const path = window.__jbrowseConfigPath
let { hubURL, configPath = path || 'config.json' } = self
console.log({ hubURL, configPath })
const { hubURL, configPath = path || 'config.json' } = self
if (!hubURL) {
// @ts-expect-error
if (window.__jbrowseCacheBuster) {
configPath += `?rand=${Math.random()}`
}
const text = await openLocation({
uri: configPath,
uri:
configPath +
// @ts-expect-error
(window.__jbrowseCacheBuster ? `?rand=${Math.random()}` : ''),
locationType: 'UriLocation',
}).readFile('utf8')
const config = JSON.parse(text)
Expand Down
12 changes: 11 additions & 1 deletion products/jbrowse-web/src/components/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ export function Loader({
setTrackList(undefined, 'replaceIn')
setNav(undefined, 'replaceIn')
setHighlight(undefined, 'replaceIn')
}, [])
}, [
setAssembly,
setHighlight,
setHubURL,
setLoc,
setNav,
setPassword,
setSessionTracks,
setTrackList,
setTracks,
])

return <Renderer loader={loader} />
}
Expand Down
4 changes: 2 additions & 2 deletions products/jbrowse-web/src/loadHubSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type PluginManager from '@jbrowse/core/PluginManager'
export async function loadHubSpec(
{
hubURL,
sessionTracks = [],
//sessionTracks = [],
}: {
hubURL: string[]
sessionTracks: Record<string, unknown>[]
Expand All @@ -22,7 +22,7 @@ export async function loadHubSpec(

// @ts-expect-error
rootModel.setSession({
name: `${hubURL.join(',')}`,
name: hubURL.join(','),
sessionConnections: hubURL.map(r => ({
type: 'UCSCTrackHubConnection',
connectionId: r,
Expand Down
Loading

0 comments on commit 41b107d

Please sign in to comment.