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

add clickToHighlight to gCNV track #1429

Merged
merged 5 commits into from
Nov 24, 2021

Conversation

jethror1
Copy link
Contributor

Adds clickToHighlight option to gCNV track for setting sample line colour on click.

Accepts either a single fixed colour or a keyword any that sets a random colour for each line.

Line colour is unset on clicking the same line again.

Closes #1411

Example of clickToHighlight=red:

gcnv_igv_red

Example of clickToHighlight=any:

gcnv_igv_random

@jrobinso
Copy link
Contributor

This is a rather extreme method to force a repaint

igv.visibilityChange()  // prompt redraw to change colour of clicked sample

Try this instead

this.trackView.repaintViews();

Where "this" is the track object itself

@jethror1
Copy link
Contributor Author

Have changed it, I wasn't sure on the best way to prompt redraw and used your suggestion from here: #756 (comment)

@jrobinso
Copy link
Contributor

Yes I should document this, apologies for that. resize() and visibilityChange() will work but also potentially result in repainting all tracks, not just the one affected, and also potentially a data reload, not just a repaint.

@jrobinso jrobinso merged commit c1b19e3 into igvteam:master Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highlight samples in gcnv bed on click instead of specifying in file
2 participants