HierarchicalTrackSelectorWidget
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Provided by the data-management plugin. View source.
Properties
| Member | Description |
|---|---|
idid: ElementId | |
typetype: types.literal('HierarchicalTrackSelectorWidget') | |
| view | |
trackContainerIdtrackContainerId: types.maybe(types.string) | Which of the view's track containers this selector writes into, by id. Absent — the usual case — means the view itself. A view owning several track lists (the synteny view, one per level band) names one here; the container is resolved through view.trackContainerFor rather than referenced directly, because it isn't a view and so isn't a legal target for the view reference above. |
Volatiles
| Member | Description |
|---|---|
favoritesfavorites: localStorageGetJSON<string[]>(favoritesK(), []) | |
recentlyUsedrecentlyUsed: [] as string[] | |
selectedTrackIdsselectedTrackIds: [] as string[] | the shopping cart, by trackId — like favorites, recentlyUsed and shownTrackIds, and unlike the config objects it used to hold. A config is not a stable identity: a non-admin's edit to an admin track resolves through a fresh merged object (ADR-032), so a selection holding the old one kept counting in the cart while the row it belonged to went back to looking unselected. Read selection for the configs. |
| sortTrackNames | |
| sortCategories | |
categoryModecategoryMode: observable.map<string, CategoryMode>() | per-category rendering mode; absent means expanded. Collapsed and folder are mutually exclusive by construction, so un-foldering a category can't reveal a stale collapse underneath it |
filterTextfilterText: '' | |
recentlyUsedCounterrecentlyUsedCounter: 0 | |
favoritesCounterfavoritesCounter: 0 |
Getters
| Member | Description |
|---|---|
trackContainerTrackContainer | undefined | The track list this selector shows and writes into: the view itself, or one of its containers when trackContainerId names one. |
shownTrackIdsSet<string> | |
favoritesSetSet<string> | |
recentlyUsedSetSet<string> | |
assemblyNamesstring[] | |
activeSortTrackNamesany | |
activeSortCategoriesany | |
configAndSessionTrackConfigurationsAnyConfigurationModel[] | the tracks this view can be offered — its assemblies' sequence tracks, then the session's list filtered to what it can draw |
| allTracks | one group per connection config (not just live instances), so a connection shows in the tree before it's loaded; expanding it hydrates the connection (see toggleCategory). Tracks are empty until then. Each track is resolved to a TrackNodeSource and sorted here rather than in generateHierarchy, so a filterText keystroke reads no configs and re-sorts nothing (filtering preserves order) |
filterQuerystring | the normalized filter box contents; empty when nothing is being searched for |
filterActiveboolean | a query is being searched for, which forces categories open (isFilterForcedOpen) |
filteredTrackSetSet<AnyConfigurationModel> | tracks matching filterText. An empty query matches everything, since ''.includes is always true, so there is no unfiltered special case |
sessionTrackIdsSet<any> | a non-admin's added/copied tracks, which the tree groups under a "Session tracks" category. Membership is the session's own list — the source of truth — not a suffix baked into the trackId |
allTrackConfigurationsAnyConfigurationModel[] | every track the current view can display, tree order. Derived from allTracks so there is exactly one filterTracks() pass, shared with the tree: the faceted selector, favorites and recently-used then can't offer a track the view has no way to open. Connection tracks used to reach the faceted selector unfiltered, which listed a connection's other-assembly tracks next to the config's filtered ones |
allTrackConfigurationMapMap<any, AnyConfigurationModel> | |
selectionAnyConfigurationModel[] | The selected track configs, resolved from selectedTrackIds on read exactly as favorites and recently-used are. Every delete path (the cart's "Delete tracks", a single track's menu) reads it. A track that has been removed no longer resolves, so nothing has to clear it from the selection, and an edited track stays selected, since the id outlives the config object an edit replaces. |
selectionSetSet<string> | the selected trackIds that still resolve to a track — selection's ids, so a row can ask whether it is selected without the config identity comparison that used to answer it |
favoriteTracksAnyConfigurationModel[] | filters out tracks that are not in the favorites group |
recentlyUsedTracksAnyConfigurationModel[] | filters out tracks that are not in the recently used group |
hierarchy{ name: string; id: string; type: "category"; children: {…}[]; } | a group is kept even when no track in it survives the filter, so an empty connection still shows in the tree |
rowsTreeRow[] | every rendered row, in order, with its height and scroll offset |
treeHeightnumber | |
folderTrackNodesMap<string, TreeTrackNode[]> | |
folderCategoryStatsMap<string, { active: number; total: number; }> | |
hasAnySubcategoriesboolean |
Methods
| Member | Description |
|---|---|
isFavorite(trackId: string) => boolean | |
isRecentlyUsed(trackId: string) => boolean | |
isSelected(trackId: string) => boolean | |
| visibleRange |
Actions
| Member | Description |
|---|---|
setSortTrackNames(val: boolean) => void | |
setSortCategories(val: boolean) => void | |
setSelection(trackIds: string[]) => void | |
addToSelection(trackIds: string[]) => void | |
removeFromSelection(trackIds: string[]) => void | |
clearSelection() => void | |
addToFavorites(trackId: string) => void | |
removeFromFavorites(trackId: string) => void | |
clearFavorites() => void | |
setRecentlyUsedCounter(val: number) => void | |
setRecentlyUsed(str: string[]) => void | |
setFavoritesCounter(val: number) => void | |
addToRecentlyUsed(id: string) => void | |
clearRecentlyUsed() => void | |
setView(view: unknown) => void | |
setTrackContainerId(id: string | undefined) => void | |
setCategoryMode(id: string, mode: CategoryMode | undefined) => void | |
clearCategoryModes() => void | |
clearFilterText() => void | |
setFilterText(newText: string) => void | |
setCategoryCollapsed(id: string, collapsed: boolean) => void | the single gate on accordion state: a folder is a mode the user picked, not an accordion that happens to be shut, so every collapse/expand — one row, a bulk menu item, or "expand all" — passes it by |
setFolderCategory(id: string, isFolder: boolean) => void | folder and collapsed are the same slot, so leaving folder mode always lands on an expanded category |
expandAllCategories() => void | |
toggleCategory(id: string) => void | |
collapseSubCategories() => void | |
collapseTopLevelCategories() => void |