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.
60
stars
17
forks
source link
Common ancestors shared in multiple lines bugs array #153
I am experiencing an issue with viewing a family tree where an ancestor is shared across multiple lines or branches of the tree. When a person has multiple direct descendants, especially in cases of siblings who have their own descendants, the common ancestor (e.g. grandparents or great-grandparents) does not display correctly on all descendant branches.
Issue
When viewing the family tree, I have identified the following specific glitches due to common ancestors:
Shared Ancestors Hiding: When an ancestor (e.g. a grandparent) appears as a parent on multiple branches, it does not display correctly on all paths. This results in a "hole" in the tree, where an ancestor is only displayed on one branch and hidden on the others.
Inconsistent Initial Focus: When setting focus to a specific node (e.g. a descendant that is on a branch with shared ancestors), the script fails to center the tree correctly. This appears to be because the shared ancestor is not displayed on all branches and therefore affects the correct positioning of the nodes on the screen.
Inefficient Data Duplication: I tried to work around the problem by duplicating the common ancestor with different IDs (one for each branch), but this creates data redundancy and loses the integrity of the tree, in addition to making it harder to maintain records.
Expected Behavior
Display Shared Ancestors Consistently: I would like the common ancestor to appear correctly in all descendant branches, without having to duplicate the ancestor in the node array.
Proper Centering on Specific Nodes: Centering or initial focus on a specific node should work properly, even if the node belongs to a branch with shared ancestors.
Development Environment
Library: familytree.js
Language: JavaScript
Custom Settings: Initial focus on a specific node; multiple lines of descendants with common ancestors.
Tried Solutions
Rearrange the node array by putting older ancestors first.
Create duplicate nodes for the same ancestor (inefficient and not scalable).
Suggestions
It would be useful to implement internal logic in the library to correctly detect and display shared ancestors, as well as to ensure that node focus works regardless of the presence of common ancestors.
We are currently working on a new implementation of FamilyTree JS.
Here is an example of it with common ancestors. Please check it this is what you want:
I am experiencing an issue with viewing a family tree where an ancestor is shared across multiple lines or branches of the tree. When a person has multiple direct descendants, especially in cases of siblings who have their own descendants, the common ancestor (e.g. grandparents or great-grandparents) does not display correctly on all descendant branches.
Issue
When viewing the family tree, I have identified the following specific glitches due to common ancestors:
Shared Ancestors Hiding: When an ancestor (e.g. a grandparent) appears as a parent on multiple branches, it does not display correctly on all paths. This results in a "hole" in the tree, where an ancestor is only displayed on one branch and hidden on the others.
Inconsistent Initial Focus: When setting focus to a specific node (e.g. a descendant that is on a branch with shared ancestors), the script fails to center the tree correctly. This appears to be because the shared ancestor is not displayed on all branches and therefore affects the correct positioning of the nodes on the screen.
Inefficient Data Duplication: I tried to work around the problem by duplicating the common ancestor with different IDs (one for each branch), but this creates data redundancy and loses the integrity of the tree, in addition to making it harder to maintain records.
Expected Behavior
Display Shared Ancestors Consistently: I would like the common ancestor to appear correctly in all descendant branches, without having to duplicate the ancestor in the node array.
Proper Centering on Specific Nodes: Centering or initial focus on a specific node should work properly, even if the node belongs to a branch with shared ancestors.
Development Environment
Library: familytree.js Language: JavaScript Custom Settings: Initial focus on a specific node; multiple lines of descendants with common ancestors.
Tried Solutions
Rearrange the node array by putting older ancestors first. Create duplicate nodes for the same ancestor (inefficient and not scalable).
Suggestions
It would be useful to implement internal logic in the library to correctly detect and display shared ancestors, as well as to ensure that node focus works regardless of the presence of common ancestors.