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.
50 stars 16 forks source link

Can't expand all notes initially #57

Closed Nimrod-666 closed 1 year ago

Nimrod-666 commented 1 year ago

Hi, i'm trying to create a dogs family tree and have the issue that i want to be all notes expanded initially (without the little tree icons to expand a mother/fathers side), like you did on your royal family tree demo. I tired to copy the options from the royal family demo and searched around in the docs, but can't find anything about that.

Could you please give me a hint how i can expand all notes initially and disable the option to colapse them?

2023-02-16 12_06_13-Mozilla Firefox

My initial call: var family = new FamilyTree(document.getElementById("tree"), { mode: "dark", orientation: FamilyTree.orientation.bottom, enableSearch: false, nodeBinding: { field_0: "name" } });

My load array: [ { "id": 1, "name": "Gabby Gayle Leo Ginger", "fid": 14, "mid": 15, "gender": "female" }, { "id": 2, "name": "WITCHES LACREME'S TRICK", "fid": 6, "mid": 7, "gender": "male", "pids": [ 3 ] }, { "id": 3, "name": "IKIMBA PUUMA", "fid": 8, "mid": 9, "gender": "female", "pids": [ 2 ] }, { "id": 4, "name": "CALIBRE M'KHULU BAAS", "fid": 10, "mid": 11, "gender": "male", "pids": [ 5 ] }, { "id": 5, "name": "EVORA PRĘGOWCE Z JASIENIA", "fid": 12, "mid": 13, "gender": "female", "pids": [ 4 ] }, { "id": 6, "name": "SIENNA'S WINDS OF CHANGE", "fid": 16, "mid": 17, "gender": "male", "pids": [ 7 ] }, { "id": 7, "name": "LECREME'S WITCHES LAROUX", "fid": 18, "mid": 19, "gender": "female", "pids": [ 6 ] }, { "id": 8, "name": "APALACHEE UMQOLO OF PRONKBERG", "fid": 20, "mid": 21, "gender": "male", "pids": [ 9 ] }, { "id": 9, "name": "IKIMBA LATIFA", "fid": 22, "mid": 23, "gender": "female", "pids": [ 8 ] }, { "id": 10, "name": "LIONHILL LESTO", "fid": 24, "mid": 25, "gender": "male", "pids": [ 11 ] }, { "id": 11, "name": "NOMVUYO JABU MISS T OF CALIBRE", "fid": 26, "mid": 27, "gender": "female", "pids": [ 10 ] }, { "id": 12, "name": "RYDGEWAY AFRICAN HUNTER", "fid": 28, "mid": 29, "gender": "male", "pids": [ 13 ] }, { "id": 13, "name": "BREMA SKANDENS CS", "fid": 30, "mid": 31, "gender": "female", "pids": [ 12 ] }, { "id": 14, "name": "LEWANIKA BAMUKONDISI", "fid": 2, "mid": 3, "gender": "male", "pids": [ 15 ] }, { "id": 15, "name": "LIANA SARNIA PRZEŁĘCZ", "fid": 4, "mid": 5, "gender": "female", "pids": [ 14 ] }, { "id": 16, "name": "KIMANI'S SHARPER IMAGE", "gender": "male", "pids": [ 17 ] }, { "id": 17, "name": "SIENNA'SEMINOLE WIND", "gender": "female", "pids": [ 16 ] }, { "id": 18, "name": "LACREME'S CLIFFORD OF BOBCAT", "gender": "male", "pids": [ 19 ] }, { "id": 19, "name": "LACREME'S MIRROR MIRROR", "gender": "female", "pids": [ 18 ] }, { "id": 20, "name": "PRONKBERG MATANGE", "gender": "male", "pids": [ 21 ] }, { "id": 21, "name": "KULIMA ZENA", "gender": "female", "pids": [ 20 ] }, { "id": 22, "name": "M ASHABA'S HARUBAH", "gender": "male", "pids": [ 23 ] }, { "id": 23, "name": "SHADYRIDGE PENDA OF IMKIMBA", "gender": "female", "pids": [ 22 ] }, { "id": 24, "name": "NAMANDLA KHWEBHA OF LIONHILL", "gender": "male", "pids": [ 25 ] }, { "id": 25, "name": "LIONHUNT ALEGRA OF LIONHILL", "gender": "female", "pids": [ 24 ] }, { "id": 26, "name": "NOMVUYO JAKE", "gender": "male", "pids": [ 27 ] }, { "id": 27, "name": "KOMKHULU VEGA OF NOHVOYO", "gender": "female", "pids": [ 26 ] }, { "id": 28, "name": "B ESAL FATOKA", "gender": "male", "pids": [ 29 ] }, { "id": 29, "name": "RYDGEWAY COPPER COIN", "gender": "female", "pids": [ 28 ] }, { "id": 30, "name": "SIMBA OF BO KAMA", "gender": "male", "pids": [ 31 ] }, { "id": 31, "name": "DELAWARE ROPOTAMO CS", "gender": "female", "pids": [ 30 ] } ]

ZornitsaPesheva commented 1 year ago

Hi,

It is not possible to have all nodes expanded at the same time.

Nimrod-666 commented 1 year ago

But what about this example here? https://balkan.app/FamilyTreeJS/Demos/royal-family-tree My structure is very similar.

ZornitsaPesheva commented 1 year ago

If Prince Philip had parents, they whouldn't be visible. The parents of one of the partners are always hidden.

Nimrod-666 commented 1 year ago

Oh i see, that's the difference. Do you have any plans to extend this functionality in the future?

ZornitsaPesheva commented 1 year ago

We permanently develop new features.