Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extendPluggableElement for context menu items #2229

Merged
merged 2 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions plugins/alignments/src/LinearPileupDisplay/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ const stateModelFactory = (
return rendererType
},

get contextMenuItems() {
contextMenuItems() {
const feat = self.contextMenuFeature
const contextMenuItems = feat
? [
Expand All @@ -378,12 +378,6 @@ const stateModelFactory = (
},
]
: []
self.additionalContextMenuItemCallbacks.forEach(
(callback: Function) => {
const menuItems = callback(feat, self, pluginManager)
contextMenuItems.push(...menuItems)
},
)
return contextMenuItems
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const stateModelFactory = (
return true
},

get contextMenuItems() {
contextMenuItems() {
return []
},

Expand Down
2 changes: 2 additions & 0 deletions plugins/alignments/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
configSchemaFactory as linearPileupDisplayConfigSchemaFactory,
modelFactory as linearPileupDisplayModelFactory,
} from './LinearPileupDisplay'
import { LinearPileupDisplayModel } from './LinearPileupDisplay/model'
import {
configSchemaFactory as linearSNPCoverageDisplayConfigSchemaFactory,
modelFactory as linearSNPCoverageDisplayModelFactory,
Expand All @@ -48,6 +49,7 @@ import {
} from './PileupRPC/rpcMethods'

export { MismatchParser }
export type { LinearPileupDisplayModel }

export default class AlignmentsPlugin extends Plugin {
name = 'AlignmentsPlugin'
Expand Down
Loading