PeWu / topola

Topola – online genealogy visualization
Apache License 2.0
92 stars 27 forks source link

Limit for number of generations displayed? #17

Open develancer opened 4 years ago

develancer commented 4 years ago

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.

PeWu commented 4 years ago

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:

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

Let me know if you have any questions.