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: localStorageGetStringArray(favoritesK()) | |
recentlyUsedrecentlyUsed: [] as string[] | |
selectedTrackIdsselectedTrackIds: [] as string[] | the shopping cart, by trackId; selection resolves 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 |
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 |
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) |
mainGroupTracksTrackNodeSource[] | the config's own and the session's tracks, resolved and sorted. Its own getter, so a connection loading re-reads none of them |
allTracksTrackGroup[] | the main group, then one group per connection config whether or not it is loaded. A dormant connection has no tracks and defaults collapsed; expanding it loads it (see toggleCategory) |
allTrackConfigurationsAnyConfigurationModel[] | every track the view can display, in tree order: what the faceted selector, favorites and recently-used resolve against |
allTrackConfigurationMapMap<any, AnyConfigurationModel> | |
selectionAnyConfigurationModel[] | the selected track configs, resolved from selectedTrackIds on read, so a deleted track drops out and an edited one stays selected |
selectionSetSet<string> | the selected trackIds that still resolve to a track |
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 | |
toggleTrack(trackId: string) => Promise<void> | shows or hides a track, recording one it showed as recently used |
collapseSubCategories() => void | |
collapseTopLevelCategories() => void | |
toggleCategory(id: string) => void | expanding a dormant connection's category loads the connection |