Skip to content

Commit

Permalink
Update extendedName description
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Sep 29, 2022
1 parent 3df332f commit 71ac22a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/core/PluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ export default class PluginManager {
const displays = this.getElementTypesInGroup('display') as DisplayType[]
displays.forEach(display => {
// view may have already added the displayType in its callback
// see ViewType for description of extendedName
if (
(display.viewType === newView.name ||
display.viewType === newView.extendedName) &&
Expand Down
9 changes: 6 additions & 3 deletions packages/core/pluggableElementTypes/ViewType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ export default class ViewType extends PluggableElementBase {

displayTypes: DisplayType[] = []

// allows for views that are 'extended' from other views to be added as a new view type in the plugin manager
// without this, the plugin manager cannot distinguish whether relevant displays have been added to the view type's list
// and thus will not display tracks that should be accessible within a view that has been extended from another
// extendedName can be used for when you extend a given view type, and want
// to register all of that view types displays to yourself e.g. you create a
// linear-genome-view subtype, and want all the tracks that are compatible
// display types for the linear-genome-view to be compatible with your type
// also (without this, display types are only registered to a single view
// type)
extendedName?: string

constructor(stuff: {
Expand Down

0 comments on commit 71ac22a

Please sign in to comment.