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. init is an array — 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',
init: [
{ 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 | |
initinit: types.frozen<BreakpointSplitViewInitView[] | undefined>() | declarative child panels (loc/assembly/tracks) resolved into views once the view has a width; used for initializing from a session snapshot. Transient — stripped by postProcessSnapshot. | 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 |
|---|---|---|
scrollZoomboolean | scroll-to-zoom is a global, personal preference resolved from the session; toggling it in any view applies everywhere | BreakpointSplitView |
hasSomethingToShowboolean | BreakpointSplitView | |
initializedboolean | 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 the dev-only retry check the fetch skeleton installs must not call that decline a dead Retry. | 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 |
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. domYOffsets — live rendering: DOM-measured track tops (relative to the overlay SVG), scrollTops still read from model. |
| 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 | |
setInit(init?: BreakpointSplitViewInitView[] | undefined) => void | 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