Skip to main content

BaseTrackModel

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

these MST models only exist for tracks that are shown. they should contain only UI state for the track, and have a reference to a track configuration. note that multiple displayed tracks could use the same configuration.

BaseTrackModel - Properties

property: id

// type signature
IOptionalIType<ISimpleType<string>, [undefined]>
// code
id: ElementId

property: type

// type signature
ISimpleType<string>
// code
type: types.literal(trackType)

property: configuration

// type signature
AnyConfigurationSchemaType
// code
configuration: ConfigurationReference(baseTrackConfig)

property: minimized

// type signature
false
// code
minimized: false

property: displays

// type signature
IArrayType<IAnyType>
// code
displays: types.array(pm.pluggableMstType('display', 'stateModel'))

BaseTrackModel - Getters

getter: rpcSessionId

determines which webworker to send the track to, currently based on trackId

// type
any

getter: name

// type
any

getter: textSearchAdapter

// type
any

getter: adapterType

// type
AdapterType

getter: viewMenuActions

// type
MenuItem[]

getter: canConfigure

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

BaseTrackModel - Methods

method: trackMenuItems

// type signature
trackMenuItems: () => (MenuDivider | MenuSubHeader | NormalMenuItem | CheckboxMenuItem | RadioMenuItem | SubMenuItem | { ...; })[]

BaseTrackModel - Actions

action: setMinimized

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

action: showDisplay

// type signature
showDisplay: (displayId: string, initialSnapshot?: {}) => void

action: hideDisplay

// type signature
hideDisplay: (displayId: string) => number

action: replaceDisplay

// type signature
replaceDisplay: (oldId: string, newId: string, initialSnapshot?: {}) => void