specify zoom on tree by clade in URL #633
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should allow specification of the 'zoom' of the tree by specifying
clade=
in the URL. Clade is specified byclade_annotation
in the tree.json and is what currently draws branch labels onto the tree (if specified).If the user zooms in on a clade this should change the URL, and if specified in the URL, should load accordingly. Could probably do with a bit more testing, but I think it plays nicely with everything else.
This was a little tricky as
applyInViewNodesToTree
inactions/tree.js
(sets visibility of nodes) modifies node.shell which does not yet exist at the point the URL queries are being 'read.' I've gotten around this by creatingnode.inView
which is then used to setshell
when it's created later (incomponents/tree/phyloTree/phyloTree.js
constructor). I don't think this messes anything up, but perhaps there's a neater way.Should resolve issue 520
Allowing clades to be specified in modular augur by AA should hopefully be possible via the branch clade in augur