BaseConnectionModel
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Built into JBrowse core. View source.
Holds the tracks a connection has loaded. Each connection type overrides
connect to fetch them from its source.
Properties
| Member | Description |
|---|---|
tracksTrackConfigEntry[] · default [] |
|
configurationBaseConnectionConfig |
The config node this model reads its settings from, through getConf. |
silentboolean · default false |
set when the connection is being re-established on session load (its open tracks are already restored from connectionTrackConfigs), so doConnect suppresses first-connect side effects like launching a view or a success snackbar. Runtime-only: connection instances aren't serialized. |
Volatiles
| Member | Description |
|---|---|
loadingboolean |
true while connect() is fetching this connection's tracks; drives a loading affordance in the track selector. Distinct from an empty tracks array, which is also the state of a connection that loaded successfully but has no tracks. |
Getters
| Member | Description |
|---|---|
connectionIdstring |
the connection's unique id, resolved from its configuration (the config is the source of truth; connection names are not guaranteed unique) |
namestring |
Actions
| Member | Description |
|---|---|
connect() => Promise<void> |
no-op hook; concrete connections (UCSC/JB2 track hubs, etc.) override this to fetch and populate their tracks. Returns a promise so afterAttach can clear the loading flag once the fetch settles. |
setLoading(loading: boolean) => void |
|
addTrackConf(trackConf: Record<string, unknown>) => TrackConfigEntry |
|
addTrackConfs(trackConfs: Record<string, unknown>[]) => void |
Appends the tracks, expanding a loose { trackId, uri } one as jbrowse.tracks does. One whose type comes from a plugin this JBrowse does not have is left out, and a warning names those types once connect settles. |
setTrackConfs(trackConfs: Record<string, unknown>[]) => void |