BaseLinearDisplay
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
Links
Docs
BaseLinearDisplay is used as the basis for many linear genome view tracks. It is block based, and can use 'static blocks' or 'dynamic blocks'
extends
BaseLinearDisplay - Properties
property: blockState
updated via autorun
// type signature
IMapType<IModelType<{ key: ISimpleType<string>; region: IType<Region, Region, Region>; reloadFlag: IType<number, number, number>; isLeftEndOfDisplayedRegion: IType<boolean, boolean, boolean>; isRightEndOfDisplayedRegion: IType<...>; }, { ...; } & ... 2 more ... & { ...; }, _NotCustomized, _NotCustomized>>
// code
blockState: types.map(BlockState)
property: configuration
// type signature
any
// code
configuration: ConfigurationReference(configSchema)
property: showLegend
// type signature
IMaybe<ISimpleType<boolean>>
// code
showLegend: types.maybe(types.boolean)
property: showTooltips
// type signature
IMaybe<ISimpleType<boolean>>
// code
showTooltips: types.maybe(types.boolean)
BaseLinearDisplay - Getters
getter: DisplayMessageComponent
if a display-level message should be displayed instead of the blocks, make this return a react component
// type
any
getter: blockType
// type
'staticBlocks' | 'dynamicBlocks'
getter: blockDefinitions
// type
any
getter: renderDelay
how many milliseconds to wait for the display to "settle" before re-rendering a block
// type
number
getter: TooltipComponent
// type
AnyReactComponentType
getter: selectedFeatureId
returns a string feature ID if the globally-selected object is probably a feature
// type
any
getter: featureWidgetType
Override in subclasses to use a different feature widget
// type
{
type: string
id: string
}
getter: showTooltipsEnabled
whether to show tooltips on mouseover, defaults to true
// type
boolean
getter: features
a CompositeMap of featureId -> feature obj that just looks in all the block
data for that feature
// type
any
getter: featureUnderMouse
// type
any
getter: layoutFeatures
// type
any
getter: getFeatureOverlapping
// type
(blockKey: string, x: number, y: number) => string
getter: getFeatureByID
// type
(blockKey: string, id: string) => LayoutRecord
getter: searchFeatureByID
// type
(id: string) => LayoutRecord
getter: floatingLabelData
Deduplicated floating label data, computed and cached by MobX
// type
Map<string, FeatureLabelData>
BaseLinearDisplay - Methods
method: legendItems
Override in subclasses to provide legend items for the display
// type signature
legendItems: (_theme?: Theme) => LegendItem[]
method: svgLegendWidth
Returns the width needed for the SVG legend if showLegend is enabled. Used by SVG export to add extra width for the legend area.
// type signature
svgLegendWidth: (theme?: Theme) => number
method: getFeatureById
Finds a feature by ID, checking both top-level features and subfeatures if parentFeatureId is provided
// type signature
getFeatureById: (featureId: string, parentFeatureId?: string) => any
method: trackMenuItems
// type signature
trackMenuItems: () => MenuItem[]
method: contextMenuItems
// type signature
contextMenuItems: () => MenuItem[]
method: renderingProps
props for the renderer's React "Rendering" component - client-side only, never sent to the worker. includes displayModel and callbacks
// type signature
renderingProps: () => { displayModel: { [x: string]: any; heightPreConfig: number; userBpPerPxLimit: number; userByteSizeLimit: number; blockState: IMSTMap<IModelType<{ key: ISimpleType<string>; region: IType<...>; reloadFlag: IType<...>; isLeftEndOfDisplayedRegion: IType<...>; isRightEndOfDisplayedRegion: IType<...>; }, { ...; } &...
method: renderProps
props sent to the worker for server-side rendering
// type signature
renderProps: () => any
method: renderSvg
// type signature
renderSvg: (opts: ExportSvgDisplayOptions) => Promise<Element>
BaseLinearDisplay - Actions
action: addBlock
// type signature
addBlock: (key: string, block: BaseBlock) => void
action: deleteBlock
// type signature
deleteBlock: (key: string) => void
action: selectFeature
// type signature
selectFeature: (feature: Feature) => void
action: navToFeature
// type signature
navToFeature: (feature: Feature) => void
action: clearFeatureSelection
// type signature
clearFeatureSelection: () => void
action: setFeatureIdUnderMouse
// type signature
setFeatureIdUnderMouse: (feature?: string) => void
action: setSubfeatureIdUnderMouse
// type signature
setSubfeatureIdUnderMouse: (subfeatureId?: string) => void
action: setContextMenuFeature
// type signature
setContextMenuFeature: (feature?: Feature) => void
action: setMouseoverExtraInformation
// type signature
setMouseoverExtraInformation: (extra?: string) => void
action: setShowLegend
// type signature
setShowLegend: (s: boolean) => void
action: setShowTooltips
// type signature
setShowTooltips: (arg: boolean) => void
action: reload
// type signature
reload: () => Promise<void>
action: selectFeatureById
Select a feature by ID, looking up in features map and subfeatures. Falls back to RPC if not found locally (e.g., for canvas renderer).
// type signature
selectFeatureById: (featureId: string, parentFeatureId?: string, topLevelFeatureId?: string) => Promise<void>
action: setContextMenuFeatureById
Set context menu feature by ID, looking up in features map and subfeatures. Falls back to RPC if not found locally (e.g., for canvas renderer).
// type signature
setContextMenuFeatureById: (featureId: string, parentFeatureId?: string, topLevelFeatureId?: string) => Promise<void>