GMOD / GenomeFeatureComponent

Provides SVG View for Genome Features rendered with the Apollo Track Web Service from JBrowse data React Component
1 stars 4 forks source link

Add highlights #64

Closed pjhale closed 4 years ago

pjhale commented 4 years ago

This isnt ready for a pull yet but I wanted to open it to make sure this approach was okay. Basically this pull adds allele to the D3 data, uses that to select on, and adds the border. It then adds an additional datum for "selected" to make sure that on mouse out this doesn't get overwritten. Then it adds a rect feature for highlight. Right now this only works on deletions but it should be easy to add to all of them. I will then need to add a remove highlight function.

FYI @nathandunn

nathandunn commented 4 years ago

I think it makes sense so long as there is a way to delete or hide the extra datums when you select off of them.

pjhale commented 4 years ago

Added the rest so that its working for all variant types. I also added a 'target' requirement for selecting a specific browser. There isnt a "remove" function but the normal setSelectedAlleles function removes highlighting first. So if an empty list is passed all is removed. This behavior could be changed if need be.

pjhale commented 4 years ago

FYI @nathandunn tweaked line opacity and width. Also corrected the height of the highlight to the current browser height. Feel free to change if you'd like but I messed about with different opacities, line widths, outlines, etc and I think this works best overall. I would almost like having a black line/ black border but that seems to make the black/grey text of the transcripts difficult to read.

nathandunn commented 4 years ago

is it ready for me to test and review?

pjhale commented 4 years ago

Yes it is.

nathandunn commented 4 years ago

looks good!

nathandunn commented 4 years ago

https://agr-jira.atlassian.net/browse/AGR-2038