JBrowseReactAppRootModel
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. View source.
note: 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
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description | Defined by |
|---|---|---|
jbrowsejbrowse: jbrowseModelType | jbrowse is a mapping of the config.json into the in-memory state tree | BaseRootModel |
sessionsession: types.maybe(sessionModelType) | session encompasses the currently active state of the app, including views open, tracks open in those views, etc. | BaseRootModel |
sessionPathsessionPath: types.stripDefault(types.string, '') | BaseRootModel | |
| assemblyManager | BaseRootModel | |
| internetAccounts | InternetAccountsMixin |
Volatiles
| Member | Description | Defined by |
|---|---|---|
versionversion | JBrowseReactAppRootModel | |
pluginsUpdatedpluginsUpdated: false | JBrowseReactAppRootModel | |
| pluginsUpdatedCallback | host hook for PluginsUpdated, set from createViewState's onPluginsUpdated. Undefined means the host didn't ask to handle it. | JBrowseReactAppRootModel |
| rpcManager | BaseRootModel | |
adminModeadminMode: false | BaseRootModel | |
errorerror: undefined as unknown | BaseRootModel | |
textSearchManagertextSearchManager: new TextSearchManager(pluginManager) | BaseRootModel | |
pluginManagerpluginManager | BaseRootModel | |
mutableMenuActions: [] as MenuAction[] | RootAppMenuMixin |
Methods
| Member | Description |
|---|---|
() => Menu[] |
Actions
| Member | Description | Defined by |
|---|---|---|
setPluginsUpdated() => void | JBrowseReactAppRootModel | |
setPluginsUpdatedCallback(callback: (args: PluginsUpdate) => void) => void | JBrowseReactAppRootModel | |
setError(error: unknown) => void | BaseRootModel | |
setSession(sessionSnapshot?: any) => void | Sets the active session. Remaps any legacy display type names (e.g. LinearPileupDisplay → LinearAlignmentsDisplay), drops nodes whose pluggable type this build has no plugin for (see pruneUnbuildableNodes), then walks the resulting MST tree to drop open tracks whose config can't hydrate so shared sessions still load when referencing tracks that no longer exist. Both kinds of drop are surfaced to the user via a snackbar. If filtering throws, the previous session is restored. | BaseRootModel |
setDefaultSession() => void | BaseRootModel | |
setSessionPath(path: string) => void | BaseRootModel | |
renameCurrentSession(newName: string) => void | BaseRootModel | |
| initializeInternetAccount | InternetAccountsMixin | |
| createEphemeralInternetAccount | InternetAccountsMixin | |
findAppropriateInternetAccount(location: UriLocation) => any | InternetAccountsMixin | |
(newMenus: MenuDefinition[]) => void | Replace the menu bar wholesale. Item contributions recorded before this one are dropped along with the menus they targeted, so a plugin adding to the existing bar wants appendToMenu instead. | RootAppMenuMixin |
(menuName: string) => void | Add a top-level menu, if the app bar does not already have one with this name. | RootAppMenuMixin |
(menuName: string, position: number) => void | Insert a top-level menu, if the app bar does not already have one with this name. | RootAppMenuMixin |
(menuName: string, menuItem: MenuItem) => void | Add a menu item to a top-level menu, creating the menu if it does not exist. | RootAppMenuMixin |
(menuName: string, menuItem: MenuItem, position: number) => void | Insert a menu item into a top-level menu, creating the menu if it does not exist. | RootAppMenuMixin |
(menuPath: string[], menuItem: MenuItem) => void | Add a menu item to a sub-menu, creating any part of the path that does not exist. | RootAppMenuMixin |
| Insert a menu item into a sub-menu, creating any part of the path that does not exist. | RootAppMenuMixin |