Skip to main content

JBrowseWebRootModel

Note: this document is automatically generated from mobx-state-tree objects in our source code. See Core concepts and intro to pluggable elements for more info

Also note: this document represents the state model API for the current released version of jbrowse. If you are not using the current version, please cross reference the markdown files in our repo of the checked out git tag

Source code

GitHub page

Docs

composed of

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

JBrowseWebRootModel - Properties

property: configPath

// type signature
IMaybe<ISimpleType<string>>
// code
configPath: types.maybe(types.string)

JBrowseWebRootModel - Methods

method: menus

// type signature
menus: () => Menu[]

JBrowseWebRootModel - Actions

action: setSavedSessionMetadata

// type signature
setSavedSessionMetadata: (sessions: SessionMetadata[]) => void

action: fetchSessionMetadata

// type signature
fetchSessionMetadata: () => Promise<void>

action: setSessionDB

// type signature
setSessionDB: (sessionDB: IDBPDatabase<SessionDB>) => void

action: setSession

// type signature
setSession: (sessionSnapshot?: ModelCreationType<ExtractCFromProps<{ id: IOptionalIType<ISimpleType<string>, [undefined]>; name: ISimpleType<string>; margin: IType<number, number, number>; }>>) => void

action: setPluginsUpdated

// type signature
setPluginsUpdated: (flag: boolean) => void

action: setDefaultSession

// type signature
setDefaultSession: () => void

action: activateSession

// type signature
activateSession: (id: string) => Promise<void>

action: favoriteSavedSession

// type signature
favoriteSavedSession: (id: string) => Promise<void>

action: unfavoriteSavedSession

// type signature
unfavoriteSavedSession: (id: string) => Promise<void>

action: deleteSavedSession

// type signature
deleteSavedSession: (id: string) => Promise<void>

action: renameCurrentSession

// type signature
renameCurrentSession: (sessionName: string) => void

action: setError

// type signature
setError: (error?: unknown) => void