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.
In the Balkan Family Tree application, users can add relatives to the existing family tree through the UI. Specifically, they can add 'parent' and 'spouse' nodes to the tree. However, an issue has emerged where the object returned for both 'parent' and 'spouse' nodes is almost identical, making it difficult to programmatically identify which type of relative is being added.
Existing Object Structure
When a parent or spouse event is triggered, the object returned looks something like this:
Note: I am using chart.on('updated') function
{
"gender": "male",
"pids": [
"64e77363e4c7cdc04db11872"
],
"id": "_90d4"
}
In the Balkan Family Tree application, users can add relatives to the existing family tree through the UI. Specifically, they can add 'parent' and 'spouse' nodes to the tree. However, an issue has emerged where the object returned for both 'parent' and 'spouse' nodes is almost identical, making it difficult to programmatically identify which type of relative is being added.
Existing Object Structure When a parent or spouse event is triggered, the object returned looks something like this: Note: I am using chart.on('updated') function { "gender": "male", "pids": [ "64e77363e4c7cdc04db11872" ], "id": "_90d4" }