You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I’ve come upon the need to have browser events for when a user adds a new track and when a user modifies a ROI. I’m wondering if some code for these events already exists, and if so it would be fantastic if you could expose these events in the public API here. If not, do you think you could point me to a spot in the code that I could look at to possibly work on adding these events to our fork?
thanks for making a great tool,
Simon
The text was updated successfully, but these errors were encountered:
Are you creating a custom app using the API? You should be calling browser.loadTrack(config) so you already know when the user adds a track. There are no igv.js menus for a user to directly load a track. So I'm confused on this one, how is the user adding a track?
For ROIs, users can add a new one, delete a user-added ROI, or edit the description.
Adding and deleting ROIs can be caught in the addFeature and removeFeature functions of class ROISet. (roi/ROISet.js). Editing a description is a bit of a hack, we are using the generic feature.name property, setting it directly from a menu. You can catch that in the menu event listener in roi/ROIMenu, line 58 in the current code base
const value = this.browser.inputDialog.input.value || ''
feature.name = value.trim()
Yes that will should be a good solution for the tracks, not sure how I didn't think of that one. Thanks for the note on the ROIs I should have what I need there now.
Hi IGV team,
Recently I’ve come upon the need to have browser events for when a user adds a new track and when a user modifies a ROI. I’m wondering if some code for these events already exists, and if so it would be fantastic if you could expose these events in the public API here. If not, do you think you could point me to a spot in the code that I could look at to possibly work on adding these events to our fork?
thanks for making a great tool,
Simon
The text was updated successfully, but these errors were encountered: