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

Source file

products/jbrowse-web/src/rootModel/rootModel.ts

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 - Getters

getter: savedSessions

// type
any[]

getter: autosaveId

// type
string

getter: previousAutosaveId

// type
string

getter: savedSessionNames

// type
any[]

getter: currentSessionId

// type
string

JBrowseWebRootModel - Methods

method: localStorageId

// type signature
localStorageId: (name: string) => string

JBrowseWebRootModel - Actions

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: renameCurrentSession

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

action: addSavedSession

// type signature
addSavedSession: (session: { name: string; }) => void

action: removeSavedSession

// type signature
removeSavedSession: (session: { name: string; }) => void

action: duplicateCurrentSession

// type signature
duplicateCurrentSession: () => void

action: activateSession

// type signature
activateSession: (name: string) => void

action: saveSessionToLocalStorage

// type signature
saveSessionToLocalStorage: () => void

action: setError

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