BaseWebSession

Note: this document is automatically generated from @jbrowse/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

used for "web based" products, including jbrowse-web and react-app composed of

BaseWebSession - Properties

property: sessionPlugins

// type signature
IArrayType<IType<PluginDefinition & { name: string; }, PluginDefinition & { name: string; }, PluginDefinition & { name: string; }>>
// code
sessionPlugins: types.array(
        types.frozen<PluginDefinition & { name: string }>(),
      )

BaseWebSession - Getters

getter: tracks

// type
({ [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & ... & IStateTreeNode<...>); } & IStateTreeNode<...>)[]

getter: root

// type
WebRootModelInterface

getter: assemblies

list of sessionAssemblies and jbrowse config assemblies, does not include temporaryAssemblies. basically the list to be displayed in a AssemblySelector dropdown

// type
({ [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & { ...; } & IStateTreeNode<...>); } & IStateTreeNode<...> & { ...; })[]

getter: connections

list of config connections and session connections

// type
({ [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & { ...; } & IStateTreeNode<...>); } & IStateTreeNode<...>)[]

getter: assemblyNames

list of sessionAssemblies and jbrowse config assemblies, does not include temporaryAssemblies. basically the list to be displayed in a AssemblySelector dropdown

// type
string[]

getter: version

// type
string

getter: shareURL

// type
any

getter: textSearchManager

// type
TextSearchManager

getter: assemblyManager

// type
{ assemblies: IMSTArray<IModelType<{ configuration: IMaybe<IReferenceType<IAnyType>>; }, { error: unknown; loadingP: Promise<void> | undefined; volatileRegions: BasicRegion[] | undefined; ... 4 more ...; allRefNamesWithLowerCase: Set<...> | undefined; } & ... 5 more ... & { ...; }, _NotCustomized, _NotCustomized>> &...

getter: savedSessionMetadata

// type
SessionMetadata[] | undefined

getter: history

// type
{ canUndo: boolean; canRedo: boolean; undo(): void; redo(): void; }

BaseWebSession - Methods

method: renderProps

// type signature
renderProps: () => {
  theme: Theme
  highResolutionScaling: any
}

method: getTrackActions

raw track actions (Settings, Copy, Delete) without submenu wrapper

// type signature
getTrackActions: (config: { [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & { ...; } & IStateTreeNode<...>); } & IStateTreeNode<...>, view?: { ...; } | undefined) => MenuItem[]

method: getTrackListMenuItems

flattened menu items for use in hierarchical track selector

// type signature
getTrackListMenuItems: (config: { [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & { ...; } & IStateTreeNode<...>); } & IStateTreeNode<...>, view?: { ...; } | undefined) => MenuItem[]

method: getTrackActionMenuItems

// type signature
getTrackActionMenuItems: (config: { [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & { ...; } & IStateTreeNode<...>); } & IStateTreeNode<...>, extraTrackActions?: MenuItem[] | undefined, effectiveConfig?: Record<...> | ...

method: menus

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

BaseWebSession - Actions

action: addAssemblyConf

// type signature
addAssemblyConf: (conf: AnyConfiguration) => void

action: addSessionPlugin

// type signature
addSessionPlugin: (plugin: PluginDefinition & { name: string; }) => void

action: removeSessionPlugin

// type signature
removeSessionPlugin: (pluginDefinition: PluginDefinition) => void

action: deleteSavedSession

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

action: setSavedSessionFavorite

// type signature
setSavedSessionFavorite: (id: string, favorite: boolean) => Promise<void>

action: renameCurrentSession

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

action: activateSession

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

action: setDefaultSession

// type signature
setDefaultSession: () => void

action: setSession

// type signature
setSession: (sessionSnapshot: ModelCreationType<ExtractCFromProps<{ id: IOptionalIType<ISimpleType<string>, [undefined]>; name: ISimpleType<string>; margin: IType<number | undefined, number, number>; focusedViewId: IMaybe<...>; } & ... 7 more ... & { ...; }>>) => void

action: editTrackConfiguration

// type signature
editTrackConfiguration: (configuration: ({ [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({ [x: string]: any; } & NonEmptyObject & ... & IStateTreeNode<...>); } & IStateTreeNode<...>) | { ...; }) => void