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

Connector position failure in rare cases. #6

Closed mitu-lv closed 3 years ago

mitu-lv commented 3 years ago

graph Tried it with really large set of nodes, connectors at one only one point failed to draw correctly. 682 and 78 are children of 684 and 685. 684 however has two spouses 685 and 76.

big-sample.zip

Tried it with sample code from this node const data: { [key: string]: any[] } = { '285': bigSample, };

Maybe author has an idea what would be wrong with data? Or maybe it is a bug?

SanichKotikov commented 3 years ago

Looks like a bug. I will look into.

SanichKotikov commented 3 years ago

Published v2.1.0. @mitu-lv can you check it?

mitu-lv commented 3 years ago

Sure @SanichKotikov!

mitu-lv commented 3 years ago

image That issue is fixed now, but the beginning of example is drawn out of canvas :( First node that is drawn is not the left most in example.

SanichKotikov commented 3 years ago

That issue is fixed now

Nice! Thanks.

but the beginning of example is drawn out of canvas :( First node that is drawn is not the left most in example.

This is a browser's limitation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#Maximum_canvas_size