auspice icon indicating copy to clipboard operation
auspice copied to clipboard

Zoom range for Diversity view is changed after every click on a new bar

Open corneliusroemer opened this issue 2 years ago • 3 comments

Current Behavior
When I zoom into a gene in the diversity view and click on a tip, the zoom range resets. In particular, there seems to be a 'minimum range' that you can't maintain. Auspice will always force the range to be wider after every click. I don't understand why a user would want this. I set the range to whatever I want it on purpose, if it's zoomed out it becomes hard to click.

Expected behavior
I want the width of the zoom range to stay maintained after clicks.

How to reproduce
Steps to reproduce the current behavior:

  1. Set zoom range to something narrow
  2. Click on a tip
  3. Observe the new zoom range

Your environment: if browsing Nextstrain online
Happens on Firefox and Brave

Before step 2 (having set narrow zoom range): image

After step 2 (click): range has been broadened image

corneliusroemer avatar Sep 17 '21 10:09 corneliusroemer

This would be a good improvement I think. I'm changing labels here, as I believe this behavior was intentional when it was implemented, albeit quite some time ago.

I'll note one case to consider during implementation: when changing to a genotype outside the current zoom range, which can happen in narrative mode or via the sidebar dropdown, we do want to change the selected zoom range.

jameshadfield avatar Sep 20 '21 00:09 jameshadfield

Thanks for the clarification. For smaller genomes like flu HA the minimum zoom range may have made sense.

As a quick fix, would it be possible to change the value of the minimum zoom range?

Is it quantified in terms of proportion of genome, e.g. at least 15% or in terms of nucleotides? I could imagine the problem is that it's proportion as opposed to number of nucleotides.

corneliusroemer avatar Sep 20 '21 11:09 corneliusroemer

It appears to try to use gene boundaries for aa mutations, and 5% if nucleotide.

jameshadfield avatar Sep 20 '21 21:09 jameshadfield