SanichKotikov / react-family-tree-example

FamilyTree demo
https://sanichkotikov.github.io/react-family-tree-example/
36 stars 24 forks source link

Female and male placeholder when using the library on react #12

Open matthewfelixr opened 1 year ago

matthewfelixr commented 1 year ago

Good day Mr. SanichKotikov,

First of all, thank you for making this library, im very happy to know that there are usable library like this with 2 parents.. but i encountered some Issue that Even i only had 1 Node, it popped up a parent Node , female-placeholder and male-placeholder.. i would like to know how to hide those placeholder if i wanted the top node does not have any parents?

and secondly, i wanna know how pinch-zoom-pan works at current version.. since i want to know how to implement the zoom and draggable motion only in one div tags, and when i try it, my whole page can be dragged

I hope you're gonna respond to this, thanks in advance Mr. Sanich Kotikov

image

SanichKotikov commented 1 year ago

Hi, thanks!

  1. You have to call calculation without placeholders option or set it to false, for example lake this calcTree(nodes, { rootId }).
  2. You can check source here https://github.com/SanichKotikov/pinch-zoom-pan