Skip to main content

DrawerWidgetSessionMixin

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

DrawerWidgetSessionMixin - Properties

property: drawerPosition

// type signature
IOptionalIType<ISimpleType<string>, [undefined]>
// code
drawerPosition: types.optional(
types.string,
() => localStorageGetItem('drawerPosition') || 'right',
)

property: drawerWidth

// type signature
IOptionalIType<ISimpleType<number>, [undefined]>
// code
drawerWidth: types.optional(
types.refinement(types.integer, width => width >= minDrawerWidth),
384,
)

property: widgets

// type signature
IMapType<IAnyType>
// code
widgets: types.map(widgetStateModelType)

property: activeWidgets

// type signature
IMapType<IMaybe<IReferenceType<IAnyType>>>
// code
activeWidgets: types.map(types.safeReference(widgetStateModelType))

property: minimized

// type signature
IOptionalIType<ISimpleType<boolean>, [undefined]>
// code
minimized: types.optional(types.boolean, false)

DrawerWidgetSessionMixin - Getters

getter: visibleWidget

// type
any

DrawerWidgetSessionMixin - Actions

action: setDrawerPosition

// type signature
setDrawerPosition: (arg: string) => void

action: updateDrawerWidth

// type signature
updateDrawerWidth: (drawerWidth: number) => number

action: resizeDrawer

// type signature
resizeDrawer: (distance: number) => number

action: addWidget

// type signature
addWidget: (typeName: string, id: string, initialState?: {}, conf?: unknown) => any

action: showWidget

// type signature
showWidget: (widget: any) => void

action: hasWidget

// type signature
hasWidget: (widget: any) => boolean

action: hideWidget

// type signature
hideWidget: (widget: any) => void

action: minimizeWidgetDrawer

// type signature
minimizeWidgetDrawer: () => void

action: showWidgetDrawer

// type signature
showWidgetDrawer: () => void

action: hideAllWidgets

// type signature
hideAllWidgets: () => void

action: editConfiguration

opens a configuration editor to configure the given thing, and sets the current task to be configuring it

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