File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
packages/jbrowse-plugin-apollo/src
LinearApolloDisplay/glyphs Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -974,8 +974,8 @@ function getContextMenuItems(
974974 } ,
975975 } )
976976 if ( isSessionModelWithWidgets ( session ) ) {
977- contextMenuItemsForFeature . push ( {
978- label : 'Open transcript details ' ,
977+ contextMenuItemsForFeature . splice ( 1 , 0 , {
978+ label : 'Open transcript editor ' ,
979979 onClick : ( ) => {
980980 const apolloTranscriptWidget = session . addWidget (
981981 'ApolloTranscriptDetails' ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { type MenuItem } from '@jbrowse/core/ui'
77import {
88 type AbstractSessionModel ,
99 getContainingView ,
10+ isSessionModelWithWidgets ,
1011} from '@jbrowse/core/util'
1112import { type LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
1213import SkipNextRoundedIcon from '@mui/icons-material/SkipNextRounded'
@@ -363,6 +364,23 @@ export function getContextMenuItemsForFeature(
363364 } ,
364365 } ,
365366 )
367+ if ( isSessionModelWithWidgets ( session ) ) {
368+ menuItems . push ( {
369+ label : 'Open feature details' ,
370+ onClick : ( ) => {
371+ const apolloGeneWidget = session . addWidget (
372+ 'ApolloFeatureDetailsWidget' ,
373+ 'apolloFeatureDetailsWidget' ,
374+ {
375+ feature : sourceFeature ,
376+ assembly : currentAssemblyId ,
377+ refName : region . refName ,
378+ } ,
379+ )
380+ session . showWidget ( apolloGeneWidget )
381+ } ,
382+ } )
383+ }
366384 return menuItems
367385}
368386
You can’t perform that action at this time.
0 commit comments