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

Wrong shift family when building the tree in the parent direction #16

Closed ialse closed 2 years ago

ialse commented 2 years ago

There is a problem when building the tree in the parent direction. Starting from the 3rd generation, the family on the right does not move to the right.

Previous versions of the library did not have this problem. Screenshot and link to codeSandbox

https://codesandbox.io/s/tree-3-1-0-wrong-in-parent-direction-jste1c?file=/src/wrong-parent-irection.json

Screenshot explanation: Fedor and Lena have 2 parents, but Fedor's parents moved to the left and ended up under other cards image

SanichKotikov commented 2 years ago

Fixed in v3.2.0