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

Add node button to display next most specific ancestor for each child node #9

Open
shintoo opened this issue Dec 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@shintoo
Copy link
Owner

shintoo commented Dec 1, 2021

E.g. if the tree is:

  • Birds (aves)
    • Blue jay (cyanocitta cristata)
    • Common kingfisher (alcedo atthis)

Then there should be a button for the class Aves node that expands the tree into:

  • Birds (aves)
    • Perching birds (passeriformes)
      • Blue jay (cyanocitta cristata)
    • Kingfishers and allies (coraciiformes)
      • Common kingfisher (alcedo atthis)

By doing something like the following:

function expand(node):
  for each child of node:
    addNode(child.ancestors.indexOf(node.id) - 1)) # Add the next lowest ancestor (e.g. pass. or cora.)
@shintoo shintoo added the enhancement New feature or request label Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant