Skip to content

Commit

Permalink
Fix the viewport calculations for when URL params includes &tracklist…
Browse files Browse the repository at this point in the history
…=true (#4250)

Order of operations for launching view
  • Loading branch information
cmdcolin committed Mar 3, 2024
1 parent 7b4901b commit f9c5d87
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions plugins/linear-genome-view/src/LaunchLinearGenomeView/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ export default (pluginManager: PluginManager) => {
)
}

await handleSelectedRegion({ input: loc, model: view, assembly: asm })

const idsNotFound = [] as string[]
tracks.forEach(track => tryTrack(view, track, idsNotFound))
if (idsNotFound.length) {
throw new Error(
`Could not resolve identifiers: ${idsNotFound.join(',')}`,
)
}
if (tracklist) {
view.activateTrackSelector()
}
Expand All @@ -78,6 +69,16 @@ export default (pluginManager: PluginManager) => {
view.setHighlight(location)
}
}

await handleSelectedRegion({ input: loc, model: view, assembly: asm })

const idsNotFound = [] as string[]
tracks.forEach(track => tryTrack(view, track, idsNotFound))
if (idsNotFound.length) {
throw new Error(
`Could not resolve identifiers: ${idsNotFound.join(',')}`,
)
}
} catch (e) {
session.notify(`${e}`, 'error')
throw e
Expand Down

0 comments on commit f9c5d87

Please sign in to comment.