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

Change to click behavior of tracks when displayMode is set to "collapsed" #544

Closed
rdhayes opened this Issue Dec 5, 2014 · 8 comments

Comments

Projects
None yet
5 participants
@rdhayes
Contributor

rdhayes commented Dec 5, 2014

Hi,

We've noticed that feature tracks set to displayMode "collapsed" retain any mouse click events. The trouble with this situation is that features are overlapping in this displayMode. Any click event that registers is merely the one associated with the feature rendered with the highest Z-level, and it is also unclear from a dense track which feature is represented.

My proposed solution is to remove all normal click events when in the "collapsed" state. This was easy to do on a test v1.11.5 dev build, but adding to _attachMouseOverEvents() in View/Track/CanvasFeatures.js where it already removes mouseover and mouseout events. This small change handles the transition from "collapsed" to "normal" or "compact" very well so far.

I would also like to attach a new click event to trigger a switch to "compact" displayMode (analogous to how the UCSC browser associates any click on a "dense" track to an expansion to "packed" state). I'm not sure how best to do this, though. The simplest approach would be be to add this to _attachMouseOverEvents() for "collapsed" displayMode as well, but the lines that follow only attach a normally expected event if none exists. Am I on the right track with this?

Comments and suggestions appreciated!

@rdhayes rdhayes added the feature req label Dec 5, 2014

@cmdcolin

This comment has been minimized.

Contributor

cmdcolin commented Dec 5, 2014

I was thinking about this recently as well, however, I was testing a track where there are no overlapping features and wanted to preserve both click and mouseover. I would make removing the click event configurable at least. And mouseovers too (those are currently disabled in collapsed mode)

https://cloud.githubusercontent.com/assets/6511937/5250596/54eb7cb8-7953-11e4-8f07-67f91e8a36b3.png

@rdhayes

This comment has been minimized.

Contributor

rdhayes commented Dec 5, 2014

Yes, adding a configuration option to turn on new behavior like this is always good.

A good example of why we need this would be this track:
http://phytozome.jgi.doe.gov/jbrowse/index.html?data=genomes%2FAthaliana&loc=Chr3%3A5550001..5600000&tracks=Blastx_protein&highlight=

Too many features to display, so we're planning to collapse such tracks in an upcoming release to clean up the default display for each organism. But then, we end up with an overabundance of overlapping features and unclear targets for click events. Also, there is high potential for end user confusion. Folks not very familiar with JBrowse or genome browsers in general won't know what to do with a collapsed data track, since you have to hover over a track label before the menu is obvious.

Regular click events for most tracks are added by View/Track/BlockBased.js. I'd need to hijack that to add a function similar to the track menu displayMode switch. I will see how that goes.

@selewis

This comment has been minimized.

selewis commented Dec 10, 2014

I seem to recall that in desktop apollo that clicking on a collapsed
feature would select everything in the stack. Might be nice to retain this
option.

Also things are the opposite strands should be in separate stacks. (i.e.
two rows, not one)

-S

On Thu, Dec 4, 2014 at 6:31 PM, Richard D. Hayes notifications@github.com
wrote:

Yes, adding a configuration option to turn on new behavior like this is
always good.

A good example of why we need this would be this track:

http://phytozome.jgi.doe.gov/jbrowse/index.html?data=genomes%2FAthaliana&loc=Chr3%3A5550001..5600000&tracks=Blastx_protein&highlight=

Too many features to display, so we're planning to collapse such tracks in
an upcoming release to clean up the default display for each organism. But
then, we end up with an overabundance of overlapping features and unclear
targets for click events. Also, there is high potential for end user
confusion. Folks not very familiar with JBrowse or genome browsers in
general won't know what to do with a collapsed data track, since you have
to hover over a track label before the menu is obvious.

Regular click events for most tracks are added by
View/Track/BlockBased.js. I'd need to hijack that to add a function similar
to the track menu displayMode switch. I will see how that goes.


Reply to this email directly or view it on GitHub
#544 (comment).

@nauer

This comment has been minimized.

nauer commented Jul 7, 2015

Hi Colin,
I have a similar track with non overlapping fragments. Is it now possible to turn on the mouseover events in the trackList.json for collapsed tracks or is it completely turned off?

@cmdcolin

This comment has been minimized.

Contributor

cmdcolin commented Jul 7, 2015

Hey @nauer , currently it is completely turned off in collapsed mode the moment. I had tested code for optionally enabling it but I can't find it right now (my screenshot shows the intended behavior though: it is collapsed but still has mouseover labels). It is not too complicated so if I get a chance I'll follow up

@nauer

This comment has been minimized.

nauer commented Jul 7, 2015

Maybe you can point me to the accountable code then I could make a try. For this kind of data only the collapsed mode make sense. But without a legend and the mouseover tag it is hard to understand the shown data.

@rdhayes

This comment has been minimized.

Contributor

rdhayes commented Jul 7, 2015

Yes, thanks for bringing this back up. Colin, I'd like to build on your
code changes to meet the other goal of this ticket, changing the
"collapsed" click events to cause only the track to expand to normal
spacing, also optional with a parameter controlling its use. That's all a
bit more tricky, I think.

Richard D. Hayes, Ph.D.
Joint Genome Institute / Lawrence Berkeley National Lab
http://phytozome.jgi.doe.gov

On Tue, Jul 7, 2015 at 12:27 PM, Norbert Auer notifications@github.com
wrote:

Maybe you can point me to the accountable code then I could make a try.
For this kind of data only the collapsed mode make sense. But without a
legend and the mouseover tag it is hard to understand the shown data.


Reply to this email directly or view it on GitHub
#544 (comment).

@cmdcolin

This comment has been minimized.

Contributor

cmdcolin commented Apr 28, 2017

See #870 for this one @rdhayes, could help!

@rbuels rbuels added this to the 1.13.0 milestone Feb 16, 2018

@rbuels rbuels closed this in ce1ac92 Mar 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment