TracksManagerSessionMixin
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Built into JBrowse core. View source.
Adds track configs to a session: looking one up by trackId among the config's tracks, assembly sequences and connection tracks, and adding or editing one.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
7 inherited properties from one model
From BaseSessionModel: id, name, focusedViewId, highlights, highlightsVisible, highlightLabelsVisible, heldForMissingPlugins
Volatiles
6 inherited volatiles from 2 models
From BaseSessionModel: selection, hovered, queueOfDialogs, preferencesOverrides
Getters
| Member | Description |
|---|---|
trackBasesByIdMap<string, TrackConfigEntry> | Each track's base by trackId: the entry its edits diff against. Here the config.json entry, which an edit writes directly. |
tracksTrackConfigEntry[] |
13 inherited getters from 2 models
From BaseSessionModel: root, jbrowse, rpcManager, configuration, adminMode, textSearchManager, assemblies, DialogComponent, DialogProps, animationMode, scrollZoom, numberGrouping
Methods
| Member | Description |
|---|---|
withTrackEdits(base: TrackConfigEntry) => TrackConfigEntry | A track's base as the session resolves it, its edits applied. Here the base itself. |
getTrackById(id: string) => AnyTrackConfig | undefined | Config for one trackId — a track, assembly sequence, or connection track — or undefined. Per-id reactive: every display resolves its config through this (via TrackConfigurationReference) and subscribes only to its own id, so one track's settings edit doesn't re-render the others. |
getTracksById() => Record<string, AnyTrackConfig> | Every track config the session can resolve, keyed by trackId. Prefer the per-id reactive getTrackById(id): this map is rebuilt over every track on the first read after any edit, and reading it subscribes the caller to all of them. Kept for plugins that look up ids in a non-reactive context. |
5 inherited methods from 2 models
From BaseSessionModel: getPreferenceDefault, getPreference, getPreferenceChanges
From ReferenceManagementSessionMixin: getReferringMultiple, getReferring
Actions
| Member | Description |
|---|---|
addSessionTrackConf(trackConf: AnyConfiguration) => any | Add a track config to this session. This mixin's session has no separate session-track store, so the destination is the jbrowse config — which in the products that compose it (desktop) is the single user's own file rather than something a server hands other visitors, so the two scopes are the same place. Defined here anyway so that every session has it: a feature standing a track up on the user's behalf can then call one action everywhere instead of asking which mixin it landed on. SessionTracksManagerSessionMixin overrides it with the real session-scoped store. |
publishTrackConf(trackConf: AnyConfiguration) => any | Add a track config wherever this user's catalog edits belong — the "Add track" workflows, where an admin adding a track means to add it for the whole site. SessionTracksManagerSessionMixin overrides it to send a non-admin's to the session instead; here there is only the one destination.Anything that is not an Add-track workflow wants addSessionTrackConf: a track a feature stands up on the user's behalf — a search result, a computed consensus, a reconstruction's labels — is not a catalog entry, and publishing one writes it into the config.json every visitor is served, once per click. |
addTrackConf(trackConf: AnyConfiguration) => any | Deprecated alias of addSessionTrackConf. Call that, or publishTrackConf, which say which destination they mean. |
| updateTrackConfiguration | Persist edited track config back to the in-memory jbrowse config. The session-tracks mixin overrides this so a non-admin's edits become a shareable session-track override instead. |
deleteTrackConf(trackConf: AnyTrackConfig) => any |
25 inherited actions from 3 models
From BaseSessionModel: setSelection, clearSelection, setHovered, setHighlightsVisible, setHighlightLabelsVisible, addHighlight, removeHighlight, updateHighlight, setHighlights, setPreferenceOverride, clearPreferenceOverrides, clearPreferenceOverride, setScrollZoom, setName, setFocusedViewId, removeActiveDialog, queueDialog, removeDialog
From SnackbarModel: notify, notifyError, setErrorDialog, pushSnackbarMessage, popSnackbarMessage, removeSnackbarMessage