Skip to main content


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


BaseViewModel - Properties

property: id

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

property: displayName

displayName is displayed in the header of the view, or assembly names being used if none is specified

// type signature
// code
displayName: types.maybe(types.string)

property: minimized

// type signature
// code
minimized: false

BaseViewModel - Getters

getter: menuItems

// type
() => MenuItem[]

BaseViewModel - Actions

action: setDisplayName

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

action: setWidth

width is an important attribute of the view model, when it becomes set, it often indicates when the app can start drawing to it. certain views like lgv are strict about this because if it tries to draw before it knows the width it should draw to, it may start fetching data for regions it doesn't need to

setWidth is updated by a ResizeObserver generally, the views often need to know how wide they are to properly draw genomic regions

// type signature
setWidth: (newWidth: number) => void

action: setMinimized

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