BreakpointSplitView
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Provided by the breakpoint-split-view plugin. View source.
Example usage
Hand-authored under defaultSession.views, with every setting written
directly on the view object. views is one entry per stacked panel, each
declaring the assembly, a loc, and the tracks to show. The two panels
flank a structural-variant breakpoint:
{
type: 'BreakpointSplitView',
views: [
{ assembly: 'hg38', loc: 'chr1:1,000,000-1,100,000', tracks: ['alignments'] },
{ assembly: 'hg38', loc: 'chr5:2,000,000-2,100,000', tracks: ['alignments'] },
],
}
Each tracks entry can also be a { trackId, displaySnapshot } object to
set per-panel display options (e.g. a shorter alignments height).
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description | Defined by |
|---|---|---|
typetype: types.literal('BreakpointSplitView') | BreakpointSplitView | |
heightheight: types.stripDefault(types.number, defaultHeight) | the height of the whole view in pixels, panels and overlay together | BreakpointSplitView |
showIntraviewLinksshowIntraviewLinks: types.stripDefault(types.boolean, true) | draw the links whose two ends land in the same panel, as well as the ones that cross between panels | BreakpointSplitView |
linkViewslinkViews: types.stripDefault(types.boolean, false) | sync scroll and zoom across the panels, so panning one pans them all | BreakpointSplitView |
interactiveOverlayinteractiveOverlay: types.stripDefault(types.boolean, true) | make the alignment squiggles drawn between the panels clickable, rather than a static overlay | BreakpointSplitView |
showHeadershowHeader: types.stripDefault(types.boolean, true) | show the view's own header bar, above the panels' own | BreakpointSplitView |
| views | BreakpointSplitView | |
| launch | transient launch state: the declarative panels written on the view object as views, which need a measured width before they can be built rows. preProcessSnapshot moves them here off the snapshot, the afterAttach autorun applies them and clears this, so a saved session never retains it. Not written by hand: author every setting directly on the view. | BreakpointSplitView |
idid: ElementId | BaseViewModel | |
displayNamedisplayName: types.maybe(types.string) | displayName is displayed in the header of the view, or assembly names being used if none is specified | BaseViewModel |
minimizedminimized: types.stripDefault(types.boolean, false) | collapse the view to its header bar, keeping it in the session rather than closing it | BaseViewModel |
Volatiles
| Member | Description | Defined by |
|---|---|---|
widthwidth: 800 | BreakpointSplitView | |
matchedTrackFeaturesmatchedTrackFeatures: {} | BreakpointSplitView | |
reloadCounterreloadCounter: 0 | The pure "go again" signal the shared fetch skeleton reads above every gate, bumped by reload(): after a failure every other input of the overlay fetch is unchanged, so nothing else can rewake it. The Retry on the failure notification is what spends it. | BreakpointSplitView |
fetchStatusfetchStatus: createStatusChannel() | What the overlay-feature fetch is doing, for the corner chip. A StatusChannel rather than the statusMessage/statusProgress/ setStatusMessage trio a display declares: this is a view with one operation to narrate, and the trio is a status vocabulary it has no other use for. | BreakpointSplitView |
hoveredOverlayhoveredOverlay: undefined | Which overlay curve the pointer is on, and the reason it lives here rather than in each overlay's React state: a hover the viewport can invalidate needs one place to be cleared from, which is what overlayTransformKey and the afterAttach reaction give it. | BreakpointSplitView |
bodyMountedbodyMounted: true | Whether the container has this view's body in the DOM.ViewContainer mounts a view's body only while an IntersectionObserver says it is on screen, to hold the app under the WebGL2 context ceiling (reference/GPU_CONTEXT_BUDGET.md). A view below the fold therefore has no canvas, so nothing ever calls markCanvasDrawn and the pre-first-paint term of displayPhase pins every display in it at loading with nothing left to resolve it — which parks [data-app-phase="ready"] for the whole app on a view the user cannot see.Defaults true so the containers that always mount a body — embedded views, workspace panels, and any test rendering a display directly — are unaffected and need not set it. The raw flag, written by this view's own container. A display asks effectiveBodyMounted instead, because a nested view has no container of its own. | BaseViewModel |
Getters
| Member | Description | Defined by |
|---|---|---|
| ownViews | The census entry for this view: its panels are views in their own right, and it holds no tracks outside them. | BreakpointSplitView |
scrollZoomboolean | scroll-to-zoom is a global, personal preference resolved from the session; toggling it in any view applies everywhere | BreakpointSplitView |
| pendingLaunch | the launch state that still has something to apply — the gate the loading and import-form paths below read. | BreakpointSplitView |
hasSomethingToShowboolean | BreakpointSplitView | |
initializedboolean | True on the import form too: with no panels and none pending there is nothing left to initialize, and AppReadyMarker reads a false here as the app still loading — which held data-app-phase at loading for as long as an empty split view stayed open. | BreakpointSplitView |
errorunknown | Resolved, like LGV's and linear-comparative's: it folds in the sub-views, whose assemblies are what initialized waits on. Without them a failed assembly leaves initialized false forever with nothing to report, and an SVG export waiting on it hangs behind the dialog's spinner instead of raising the error (see awaitViewInitialized). | BreakpointSplitView |
showLoadingboolean | Spinner instead of content, i.e. sub-views exist but haven't loaded their assemblies yet. Named to match LGV/dotplot/synteny/circular, which is what ViewContainer reads to publish data-view-phase. | BreakpointSplitView |
| loadingAssembly | The assembly whose load the spinner is waiting on. Delegated to the first sub-view that hasn't initialized, since each LGV already resolves this for itself; before the sub-views exist, init is what names them. | BreakpointSplitView |
loadingMessagestring | undefined | What the spinner says: which of the assembly's files is downloading, rather than a bare "Loading" for the slow part of startup. See agent-docs/reference/PROGRESS_REPORTING.md. | BreakpointSplitView |
loadingProgressnumber | undefined | Determinate fraction for the spinner's bar, when the assembly load reports one | BreakpointSplitView |
loadingSourcestring | undefined | The URL the assembly load is currently fetching, when the phase named one. Only the stalled-load notice reads it — see ViewLoadingScreen. | BreakpointSplitView |
showImportFormboolean | A failed assembly counts: the views it left behind never initialize, so there is nothing to show and no second attempt coming in this session. The form — which reports error in its banner — is then the only way forward, matching LGV/synteny/dotplot/circular rather than spinning on a showLoading that can never resolve. | BreakpointSplitView |
| assemblies | One assembly per row, index-aligned with views.Per row and not one for the view, because the rows are independently assembly-picked (the import form has an assembly selector per row, and init carries one per entry). Resolving every row's refNames through row 0's assembly is right only while they all name the same one: on a genuinely cross-assembly view the strict resolver answers undefined for every contig belonging to any other row, and the overlay drew NO connectors at all.A row whose assembly has not loaded is undefined rather than a hole, so a level index stays a level index; its features drop, which is what an unresolvable refName does anyway. | BreakpointSplitView |
matchedTracksOverlayTrack[] | Find all track ids that match across multiple views, or return just the single view's track if only a single row is used | BreakpointSplitView |
fetchInertboolean | Same name and same meaning as FetchMixin.fetchInert, on a view rather than a display: with nothing matched across the rows there is nothing for the overlay fetch to ask for, so prepare declines instead of running an empty fetch and commit on every pan. | BreakpointSplitView |
overlayTransformKeystring | Every number that moves the overlay under a stationary cursor, in one value — what installClearHoverOnSurfaceMove watches.Per row, offsetPx and bpPerPx, which covers a pan or a zoom from any entry point: the wheel, the header buttons, a locstring search, or a linkViews echo of the row next to it. Per matched track and per row, the body's scrollTop and height, since a pileup scrolls and a track resizes under a pointer that never moved, plus regionTooLarge, whose flip swaps the body for the banner and back.Scoped to the matched tracks rather than every track in the view: an unrelated track finishing its first render resizes nothing the overlay draws on, and clearing the hover for it would read as a flicker. | BreakpointSplitView |
matchedTrackChunksMap<string, MatchedChunks> | Classifies each matched track and pairs its features, keyed by trackId. Everything here is a function of the fetched features alone, so it is deliberately kept out of overlayMatches, which additionally reads each track's layout: the layout reads invalidate on a track resize or a compactness change, and fusing the two would re-run this whole pass — including the SA-chain parse, the expensive part — on every drag frame. | BreakpointSplitView |
overlayMatchesMap<string, OverlayMatch> | Zero-arg cached getter: resolves each matched chunk's features to layout rectangles, returning a Map keyed by trackId. Mobx caches this across renders and only invalidates when the underlying feature or layout reads change — so scrolling within already-loaded data does NOT trigger a re-lookup. | BreakpointSplitView |
effectiveBodyMountedboolean | Whether this view's body is in the DOM, counting the views it is nested inside — which is the question a display's phase actually asks.bodyMounted alone answers it only for a view a container renders directly. A view nested in another view (a synteny row, a breakpoint panel) has no container writing its flag, so it reads true forever while its whole subtree is out of the DOM, and every display in it waits for a first paint that nothing will make — the hang this flag exists to prevent, one level down.An ancestor that does not carry the flag at all leaves the answer alone rather than excusing the paint: only an explicit false unmounts, so a duck-typed stand-in that forgot it keeps waiting, which is the failure that shows up as a slow test rather than as a picture of an empty view. | BaseViewModel |
ownTracksAbstractTrackModel[] | The tracks this view puts in the census — its own, not a nested view's. Empty here, and overridden by the views that have any: the base cannot read self.tracks for them, because what a view keeps under that name is the view's business. react-msaview's holds its MSA annotation rows — {ReactComponent, model} objects with no configuration and no displays — and a base that helped itself to them handed them to the readiness marker as tracks, which error-paged every session holding an MSA view. | BaseViewModel |
Methods
| Member | Description |
|---|---|
exportSvg(opts?: ExportSvgOptions) => Promise<void> | creates an svg export and save using FileSaver |
getMatchedTracks(trackConfigId: string) => OverlayTrack[] | Get tracks with a given trackId across multiple views. Callers that index the result by view level (getTrackOverlayData, getMatchedFeaturesInLayout) rely on it staying aligned with views — which holds only because overlays are driven by overlayMatches, whose trackIds come from matchedTracks (the intersect across all views), so the track is present in every view and filter drops nothing. Don't level-index the result for an arbitrary trackId. |
| getTrackOverlayData | Per-render precompute for an overlay track. Resolves an OverlayLevel of geometry per view level, then returns getX/getY closures for converting feature layout records to SVG coordinates.yOffsetsOverride — SVG export: fixed track tops, scrollTops zeroed. Live rendering stacks each view's height and reads its getTrackYOffset, which the LGV keeps equal to the pixels (its label bands are measured into the model), so the overlay re-renders from MobX alone rather than polling the DOM. |
| getMatchedFeaturesInLayout | |
() => { label: string; onClick: () => void; }[] |
Actions
| Member | Description | Defined by |
|---|---|---|
setWidth(newWidth: number) => void | BreakpointSplitView | |
setHoveredOverlay(arg: OverlayHover | undefined) => void | undefined when the pointer leaves a curve, and when the picture moves out from under it — see overlayTransformKey. | BreakpointSplitView |
setInteractiveOverlay(arg: boolean) => void | BreakpointSplitView | |
setShowIntraviewLinks(arg: boolean) => void | BreakpointSplitView | |
setLinkViews(arg: boolean) => void | BreakpointSplitView | |
setScrollZoom(arg: boolean) => void | BreakpointSplitView | |
setShowHeader(arg: boolean) => void | BreakpointSplitView | |
setMatchedTrackFeatures(obj: Record<string, Feature[][]>) => void | BreakpointSplitView | |
reload() => void | Re-run the overlay-feature fetch with no input change — what the Retry on its failure notification calls. | BreakpointSplitView |
reverseViewOrder() => void | BreakpointSplitView | |
squareView() => void | BreakpointSplitView | |
| setLaunch | BreakpointSplitView | |
setViews(viewInits: BreakpointSplitViewInitView[]) => void | BreakpointSplitView | |
setDisplayName(name: string) => void | BaseViewModel | |
setBodyMounted(flag: boolean) => void | See bodyMounted. Written by the view's container, which is the only thing that knows whether it rendered the body. | BaseViewModel |
setMinimized(flag: boolean) => void | BaseViewModel |
Related links
- Guide: URL query parameter API