SanichKotikov / relatives-tree

A tiny library for calculating specific JSON data to family tree nodes and connectors 🌳
https://sanichkotikov.github.io/react-family-tree-example/
MIT License
45 stars 21 forks source link

Overlapping People #2

Closed Arkayas closed 4 years ago

Arkayas commented 4 years ago

I've got an odd issue where I've added an Ex-Spouse of great-grand parents and they don't want to render correctly they end up under the grand parent they are attached to. (it happens other times but this is the one I have sample data for)

Root = GrandA GrandEx - Renders Under GrandA not beside.

Root = GrandEx mostly renders fine...

image

[ { "id": "family", "gender": "male", "parents": [ { "id": "primary", "type": "blood" }, { "id": "partner", "type": "blood" } ], "siblings": [], "spouses": [], "children": [] }, { "id": "primary", "gender": "male", "parents": [ { "id": "grandDad", "type": "blood" }, { "id": "grandMom", "type": "blood" } ], "siblings": [], "spouses": [ { "id": "partner", "type": "married" } ], "children": [ { "id": "family", "type": "blood" } ] }, { "id": "partner", "gender": "female", "parents": [ { "id": "partGrandA", "type": "blood" }, { "id": "partGrandB", "type": "blood" } ], "siblings": [], "spouses": [ { "id": "primary", "type": "married" } ], "children": [ { "id": "family", "type": "blood" } ] }, { "id": "grandMom", "gender": "female", "parents": [], "spouses": [ { "id": "grandDad", "type": "married" } ], "siblings": [], "children": [ { "id": "primary", "type": "blood" } ] }, { "id": "grandDad", "gender": "male", "parents": [ { "id": "grandA", "type": "blood" }, { "id": "grandB", "type": "blood" } ], "spouses": [ { "id": "grandMom", "type": "married" } ], "siblings": [], "children": [ { "id": "primary", "type": "blood" } ] }, { "id": "partGrandB", "gender": "female", "parents": [], "spouses": [ { "id": "partGrandA", "type": "married" } ], "siblings": [], "children": [ { "id": "partner", "type": "blood" } ] }, { "id": "partGrandA", "gender": "male", "parents": [], "spouses": [ { "id": "partGrandB", "type": "married" }, { "id": "partGrandEx", "type": "divorced" } ], "siblings": [], "children": [ { "id": "partner", "type": "blood" } ] }, { "id": "partGrandEx", "gender": "female", "parents": [], "spouses": [ { "id": "partGrandA", "type": "divorced" } ], "siblings": [], "children": [] }, { "id": "grandB", "gender": "female", "parents": [], "spouses": [ { "id": "grandA", "type": "married" } ], "siblings": [], "children": [ { "id": "grandDad", "type": "blood" } ] }, { "id": "grandA", "gender": "male", "parents": [], "spouses": [ { "id": "grandB", "type": "married" }, { "id": "grandEx", "type": "divorced" } ], "siblings": [], "children": [ { "id": "grandDad", "type": "blood" } ] }, { "id": "grandEx", "gender": "female", "parents": [], "spouses": [ { "id": "grandA", "type": "divorced" } ], "siblings": [], "children": [] } ]

SanichKotikov commented 4 years ago

@Arkayas it's known bug. I'll fix it someday.

SanichKotikov commented 4 years ago

Fixed in v2.0.2