Skip to content

Commit

Permalink
renamed to JBrowseRootModel and JBrowseSession, set after start screen
Browse files Browse the repository at this point in the history
  • Loading branch information
teresam856 committed Nov 13, 2020
1 parent 54f2aba commit a764c01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion products/jbrowse-web/src/JBrowse.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const JBrowse = observer(({ pluginManager }) => {

useEffect(() => {
setSessionId(`local-${currentSessionId}`)
}, [currentSessionId, setSessionId])
// @ts-ignore
window.JBrowseRootModel = rootModel
// @ts-ignore
window.JBrowseSession = session
}, [currentSessionId, rootModel, session, setSessionId])

useEffect(() => {
onSnapshot(jbrowse, async snapshot => {
Expand Down
4 changes: 2 additions & 2 deletions products/jbrowse-web/src/Loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ const Renderer = observer(
// window.MODEL.views[0] in devtools

// @ts-ignore
window.SESSION = rootModel.session
window.JBrowseSession = rootModel.session
// @ts-ignore
window.ROOTMODEL = rootModel
window.JBrowseRootModel = rootModel

pluginManager.setRootModel(rootModel)

Expand Down

0 comments on commit a764c01

Please sign in to comment.