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

Limit for number of generations displayed? #17

Open
develancer opened this issue Apr 26, 2020 · 1 comment
Open

Limit for number of generations displayed? #17

develancer opened this issue Apr 26, 2020 · 1 comment

Comments

@develancer
Copy link

develancer commented Apr 26, 2020

Hi! Very cool library.
I've been experimenting to use it with webpack: https://github.com/develancer/topola-webpack

Is it possible, though, to limit the number of generations displayed? I mean, so that for any currently selected startIndi, topola would only display parents and grandparents (but not their parents) and only children and grandchildren (but not their children)? It would be very helpful for large (10+ generations) family trees combined with smaller viewports.

If it's not currently possible, please provide some directions on what part of the codebase should be responsible for such filtering. I'll be glad to try to work it out.

@develancer develancer changed the title Limit for number of generation displayed? Limit for number of generations displayed? Apr 26, 2020
@PeWu
Copy link
Owner

PeWu commented Apr 27, 2020

The library currently does not have a settable generation limit.
If you would like to add a limit option, here are the places in the code you would need to change:

maxAncestorGenerations?: number;
maxDescendantGenerations?: number;

The implementation of the limits would be in the createHierarchy() methods.

Let me know if you have any questions.

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

No branches or pull requests

2 participants