JBrowseDesktopRootModel
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. View source.
Holds JBrowse Desktop's top-level state: the loaded config, the session, internet accounts, undo history, the app menus and the text-indexing jobs.
Many properties of the root model are available through the session, and
we generally prefer using the session model (via e.g. getSession) over the
root model (via e.g. getRoot) in plugin code.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
jobsManagerjobsManager: types.optional(JobsManager, {}) |
6 inherited properties from 3 models
From HistoryManagementMixin: history
From InternetAccountsMixin: internetAccounts
From BaseRootModel: jbrowse, session, sessionPath, assemblyManager
Volatiles
| Member | Description |
|---|---|
versionstring | |
adminModeboolean | |
openNewSessionCallback(_path: string) => Promise<void> | |
openLinkCallback(_link: string) => Promise<void> | |
returnToStartScreenCallback() => void |
7 inherited volatiles from 3 models
From PluginsUpdatedMixin: pluginsUpdated
From RootAppMenuMixin:
From BaseRootModel: rpcManager, error, textSearchManager, pluginManager, detachDisposers
Methods
| Member | Description |
|---|---|
() => Menu[] |
Actions
| Member | Description |
|---|---|
setOpenNewSessionCallback(cb: (arg: string) => Promise<void>) => void | |
setOpenLinkCallback(cb: (arg: string) => Promise<void>) => void | Wired by the Loader to open a JBrowse Web link as a new session (the Loader owns plugin-manager lifecycle, as with openNewSessionCallback). |
setReturnToStartScreenCallback(cb: () => void) => void | Wired by the Loader to tear down this plugin manager and show the start screen (the Loader owns plugin-manager lifecycle). |
saveSession(val: SessionSnap, sessionPath?: string) => Promise<void> | |
| updateTrackBase | Replace a track's base config: its sessionTracks entry when the session owns the track, otherwise its jbrowse.tracks entry. |
reloadPlugins() => Promise<void> | Persist the session, then rebuild the plugin manager from disk so the changed plugin set takes effect. Run by onPluginsUpdated, which reports a failure on the session it leaves open |
flushSession() => Promise<void> | Save now rather than waiting out the autosave's 1s throttle. Every path that tears the session down has to call this first. |
17 inherited actions from 4 models
From PluginsUpdatedMixin: setPluginsUpdated
From RootAppMenuMixin: , , , , ,
From InternetAccountsMixin: initializeInternetAccount, createEphemeralInternetAccount, findAppropriateInternetAccount
From BaseRootModel: setError, addDetachDisposer, detach, setSession, setDefaultSession, setSessionPath, renameCurrentSession