BALKANGraph / FamilyTreeJS

Build family tree app with BALKAN FamilyTreeJS library. Family Tree also called a genealogy or a pedigree chart, is a chart representing family relationships in a conventional tree structure.
55 stars 16 forks source link

initially center tree on one node #7

Closed martesabt closed 2 years ago

martesabt commented 2 years ago

Hi, I would like to know if it's possible to initially center the tree view on one node.

If it's not possible it could be a good improvement.

Thanks!

ZornitsaPesheva commented 2 years ago

You can use this:

family.on('init', function(){
    family.center(5);
})
martesabt commented 2 years ago

Yes, that's what I needed!

Many thanks!