ReferenceManagementSessionMixin
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 to a session a lookup of the views and widgets that refer to a track, and an action that hides the track in those views and closes those widgets.
Methods
| Member | Description |
|---|---|
getReferringMultiple(trackIds: string[]) => Map<string, ReferringNode[]> | Walk the tree once and map each requested trackId to the nodes holding a types.reference that resolves to it (a view's track entry, a config editor widget). Track configs are matched by trackId, not identity, so a frozen base and its hydrated MST node compare equal. |
getReferring(trackId: string) => ReferringNode[] | The nodes currently referring to trackId (see getReferringMultiple). |
Actions
| Member | Description |
|---|---|
dereferenceTrack(trackId: string, referring: ReferringNode[]) => void | Remove trackId from every view referring to it and close any config editor widget open on it. Runs immediately: the walk that produced referring has finished, so mutating those views here is safe. |