Skip to content

Commit

Permalink
Add menuItems function to HelloView
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 4, 2025
1 parent 0a754a3 commit f4b660c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/HelloView/stateModel.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MenuItem } from '@jbrowse/core/ui'
import { ElementId } from '@jbrowse/core/util/types/mst'
import { types } from 'mobx-state-tree'

Expand All @@ -7,8 +8,15 @@ const stateModel = types
type: types.literal('HelloView'),
})
.actions(() => ({
// unused but required by your view
// unused by this view but it is updated with th current width in pixels of
// the view panel
setWidth() {},
}))
.views(() => ({
// unused by this view, but represents of 'view level' menu items
menuItems(): MenuItem[] {
return []
},
}))

export default stateModel

0 comments on commit f4b660c

Please sign in to comment.