Skip to main content

DockviewLayoutMixin

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

Session mixin that persists dockview layout state. Each dockview panel can contain multiple views stacked vertically.

DockviewLayoutMixin - Properties

property: dockviewLayout

Serialized dockview layout state

// type signature
IMaybe<IType<SerializedDockview, SerializedDockview, SerializedDockview>>
// code
dockviewLayout: types.maybe(types.frozen<SerializedDockview>())

property: panelViewAssignments

Maps panel IDs to arrays of view IDs (for stacking views within a panel)

// type signature
IOptionalIType<IMapType<IArrayType<ISimpleType<string>>>, [undefined]>
// code
panelViewAssignments: types.optional(
types.map(types.array(types.string)),
{},
)

property: activePanelId

The currently active panel ID in dockview

// type signature
IMaybe<ISimpleType<string>>
// code
activePanelId: types.maybe(types.string)

DockviewLayoutMixin - Getters

getter: getViewIdsForPanel

Get view IDs for a specific panel

// type
(panelId: string) => any[] | (IMSTArray<ISimpleType<string>> & IStateTreeNode<IArrayType<ISimpleType<string>>>)

DockviewLayoutMixin - Actions

action: setDockviewLayout

Save the current dockview layout

// type signature
setDockviewLayout: (layout: SerializedDockview) => void

action: setActivePanelId

Set the active panel ID

// type signature
setActivePanelId: (panelId: string) => void

action: assignViewToPanel

Assign a view to a panel (adds to the panel's view stack)

// type signature
assignViewToPanel: (panelId: string, viewId: string) => void

action: removeViewFromPanel

Remove a view from its panel

// type signature
removeViewFromPanel: (viewId: string) => void

action: removePanel

Remove a panel and all its view assignments

// type signature
removePanel: (panelId: string) => void

action: moveViewUpInPanel

Move a view up within its panel's view stack

// type signature
moveViewUpInPanel: (viewId: string) => void

action: moveViewDownInPanel

Move a view down within its panel's view stack

// type signature
moveViewDownInPanel: (viewId: string) => void

action: moveViewToTopInPanel

Move a view to the top of its panel's view stack

// type signature
moveViewToTopInPanel: (viewId: string) => void

action: moveViewToBottomInPanel

Move a view to the bottom of its panel's view stack

// type signature
moveViewToBottomInPanel: (viewId: string) => void