Closed wkpalan closed 7 years ago
CanvasFeatures.js is the only example I can think of that extends the per track menu. https://github.com/GMOD/jbrowse/blob/40aab138058772dd7e061bebd1aa14c48221868b/src/JBrowse/View/Track/CanvasFeatures.js#L967
I'm pretty sure others have built some plugins to do this, though.
On Wed, Oct 5, 2016 at 3:22 PM, Gokul Wimalanathan <notifications@github.com
wrote:
I was wondering if there was any way to add a button to specific type of feature tracks from a plugin.
I have been able to add a global menu item, but it would be more useful if it was based on a feature track menu than a global menu.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GMOD/jbrowse/issues/815, or mute the thread https://github.com/notifications/unsubscribe-auth/AJlnAUBbLv6zErRTA8n_KWbMnlpGw7Xmks5qxCMPgaJpZM4KPWkA .
Yep this is pretty common to do in plugins. You can override the _trackMenuOptions function in a subclass.
If you need an intro to the plugin I made a tutorial for how to add a menu item like this here http://searchvoidstar.tumblr.com/post/153010503488/creating-a-jbrowse-plugin
Maybe close for now! Feel free to add comments if interested, but closing since it's not necessarily a jbrowse bug or feature request
I was wondering if there was any way to add a button to specific type of feature tracks from a plugin.
I have been able to add a global menu item, but it would be more useful if it was based on a feature track menu than a global menu.