Skip to content
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

specify zoom on tree by clade in URL #633

Merged
merged 1 commit into from
Aug 25, 2018
Merged

specify zoom on tree by clade in URL #633

merged 1 commit into from
Aug 25, 2018

Conversation

emmahodcroft
Copy link
Member

This PR should allow specification of the 'zoom' of the tree by specifying clade= in the URL. Clade is specified by clade_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 in actions/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 creating node.inView which is then used to set shell when it's created later (in components/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

@jameshadfield
Copy link
Member

This looks great! Code looks good and couldn't find any obvious bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants