NonBlockCanvasDisplayMixin
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
Mixin for non-block-based displays that render to a single canvas. Provides common state for tracking rendering offset, loading state, and canvas references.
Used by displays like LinearReadCloudDisplay, LinearReadArcsDisplay, and LinearHicDisplay that render across the entire view width rather than in discrete blocks.
NonBlockCanvasDisplayMixin - Getters
getter: drawn
Whether the display has been rendered at least once
// type
boolean
NonBlockCanvasDisplayMixin - Actions
action: setLastDrawnOffsetPx
Set the offsetPx at which the canvas was rendered
// type signature
setLastDrawnOffsetPx: (n: number) => void
action: setLoading
Set loading state
// type signature
setLoading: (f: boolean) => void
action: setRef
Set reference to the canvas element
// type signature
setRef: (ref: HTMLCanvasElement) => void
action: setRenderingImageData
Set the rendering imageData from RPC
// type signature
setRenderingImageData: (imageData: ImageBitmap) => void
action: setRenderingStopToken
Set the rendering stop token
// type signature
setRenderingStopToken: (token?: StopToken) => void
action: setStatusMessage
Set the status message displayed during loading
// type signature
setStatusMessage: (msg?: string) => void