-
Notifications
You must be signed in to change notification settings - Fork 162
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
Zoom to selected is stored as a URL query #1321
base: master
Are you sure you want to change the base?
Conversation
When clicking "Zoom to selected" we now add a URL query `treeZoom=selected`, which is cleared upon the next zoom action. This allows us to load a page to a zoomed in view of the tree. This behavior is similar to when zooming to a branch which a clade label, which results in a query such as `label=clade:A1`. In the situation where both are applicable, the clade label takes priority. Note that due to the current implementation of zooming in Auspice, "zoom to selected" will zoom to different subtrees. As an example, load each of the following datasets and click "zoom to selected": `/flu/seasonal/h3n2/ha/3y?f_clade_membership=A1b/137F,A1b/197R`, `/flu/seasonal/h3n2/ha/3y?f_clade_membership=A1b/137F,A1b/197R&label=clade:A1b/131K`. The resulting subtrees will be different for each case, however both result in a URL query `treeZoom=selected`. This is a shortcoming of the implementation used in this PR, however one that is not easily solved.
@joverlee521 would you be able to review this? I can think of a solution where we calculate something like |
@jameshadfield I might be missing something here, but why doesn't the query parameter |
Am I right in thinking you are performing the following steps:
This behaviour isn't different to master: as we are no longer zoomed to the branch annotated as
(The reason I chose a branch with clade labelling originally was to make reproduction of the bug easier so one didn't have to click too much 😉 ) |
Ahhh, I see the no-name branches do make this trickier. Like you said, I don't see this getting easily solved. The |
When clicking "Zoom to selected" we now add a URL query
treeZoom=selected
, which is cleared upon the next zoom action.This allows us to load a page to a zoomed in view of the tree.
This behavior is similar to when zooming to a branch which a clade
label, which results in a query such as
label=clade:A1
. In thesituation where both are applicable, the clade label takes
priority.
Note that due to the current implementation of zooming in Auspice,
"zoom to selected" will zoom to different subtrees. As an example,
load each of the following datasets and click "zoom to selected":
/flu/seasonal/h3n2/ha/3y?f_clade_membership=A1b/137F,A1b/197R
,/flu/seasonal/h3n2/ha/3y?f_clade_membership=A1b/137F,A1b/197R&label=clade:A1b/131K
.The resulting subtrees will be different for each case, however both
result in a URL query
treeZoom=selected
. This is a shortcomingof the implementation used in this PR, however one that is not easily
solved.
Closes #1284.