Code Monkey home page Code Monkey logo

react-family-tree's People

Contributors

sanichkotikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-family-tree's Issues

please I need your help for doing some integrations

Please check this https://codesandbox.io/s/weevusissue-uvuk0?file=/src/components/App/App.tsx:2127-2173. I created tree in test-tree-n1.JSON and I want you to give some help for implementing like screenshot added below

Here is JSON data [ { id: "me", gender: "male", spouses: [], siblings: [], parents: [ { id: "father", type: "blood" }, { id: "mother", type: "blood" } ], children: [] }, { id: "father", gender: "male", spouses: [{ id: "mother", type: "married" }], siblings: [{ id: "fa_brother", type: "blood" }], parents: [ { id: "fa_Pa", type: "blood" }, { id: "fa_Ma", type: "blood" } ], children: [{ id: "me", type: "blood" }] }, { id: "mother", gender: "female", spouses: [{ id: "father", type: "married" }], siblings: [], parents: [ { id: "gg_Pa", type: "blood" }, { id: "gg_Ma", type: "blood" } ], children: [{ id: "me", type: "blood" }] }, { id: "gg_Pa", gender: "male", spouses: [{ id: "gg_Ma", type: "married" }], siblings: [], parents: [], children: [{ id: "mother", type: "blood" }] }, { id: "gg_Ma", gender: "female", spouses: [{ id: "gg_Pa", type: "married" }], siblings: [], parents: [], children: [{ id: "mother", type: "blood" }] }, { id: "fa_brother", gender: "male", spouses: [{ id: "fa_bro_spo", type: "married" }], siblings: [{ id: "father", type: "blood" }], parents: [ { id: "fa_Pa", type: "blood" }, { id: "fa_Ma", type: "blood" } ], children: [] }, { id: "fa_bro_spo", gender: "male", spouses: [{ id: "fa_brother", type: "married" }], siblings: [], parents: [], children: [] }, { id: "fa_Pa", gender: "male", spouses: [{ id: "fa_Ma", type: "blood" }], siblings: [], parents: [], children: [ { id: "father", type: "blood" }, { id: "fa_brother", type: "blood" } ] }, { id: "fa_Ma", gender: "female", spouses: [{ id: "fa_Pa", type: "blood" }], siblings: [], parents: [], children: [ { id: "father", type: "blood" }, { id: "fa_brother", type: "blood" } ] } ]

In this screenshot you can see that node is not displaying

image (3)

I need to display that node when this particular node is selected whichYou can see that in screenshot below

image (4)

Weird behaviour with shared parents on changing the root

First of all, thanks for this package! It is awesome! ๐Ÿ‘ I really appreciate all the time you invested in it.

I'm using this package to render my family tree, but I'm getting weird behavior when I change the root id. As you can see in the picture there are couples sharing the same parents. I have checked the provided relations and they look ok. It only happens when I change the root. Never happened to me, with the initial root.

image

I'm not sure if is related to this commit you did a few months ago:

SanichKotikov/relatives-tree@71fb50a#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

If I can help with something, I'm open to collaborate

How to increase connector thicknesss?

Hi
I'd like to increase thickness of connector lines. I tried to change some values in connector.js/tsx like hereafter:
...
width: Math.max(3, (x2 - x1) * width + 1),
height: Math.max(3, (y2 - y1) * height + 1),

but this breaks family tree display.

Thanks

I want to display uncle node when child-node is at root

Please check this https://codesandbox.io/s/weevusissue-uvuk0 and select uncle-issue.json. I want you to help me in this issue.

Here is provided JSON data

[ { id: "0chil", gender: "male", spouses: [], siblings: [], parents: [{ id: "1fath", type: "blood" }], children: [] }, { id: "1fath", gender: "male", spouses: [], siblings: [{ id: "uncle", type: "blood" }], parents: [ { id: "grandPa", type: "blood" }, { id: "grandMa", type: "blood" } ], children: [{ id: "0chil", type: "blood" }] }, { id: "uncle", gender: "male", spouses: [], siblings: [{ id: "1fath", type: "blood" }], parents: [ { id: "grandPa", type: "blood" }, { id: "grandMa", type: "blood" } ], children: [] }, { id: "grandPa", gender: "male", spouses: [], siblings: [], parents: [], children: [ { id: "1fath", type: "blood" }, { id: "uncle", type: "blood" } ] }, { id: "grandMa", gender: "male", spouses: [], siblings: [], parents: [], children: [ { id: "1fath", type: "blood" }, { id: "uncle", type: "blood" } ] } ]
image (1)

Subtitles and audio layers

The new releases are causing our app to crash I'm not sure why. I wanted to ask about the subtitles. There are no labels shown to switch between different languages. Also are you planning to add the ability to switch between audio when a movie has more than one audio option ?

Nodes are overlapping

Hi,

I have made some changes that all spouses nodes are shifted to left side.
So at one staging nodes are going to overlap to each other.

Can you plz help me to fix it.

Untitled

Visualizing Divorce

As the package stands, there is no visual distinguishing divorced couples from married couples. Wondering how to change this?

Example data structure

Hi, could you please provide example data structures for the visualized trees? I checked you uploaded some mock data in 2019, but it seems they are no longer compatible with the current version...

Thank you

is it possible to change the connector of the tree from left to right(Horizontal)

Im trying to translate the node horizontally. so i modified the below code
" transform: translate(${node.left * (WIDTH / 2)}px, ${ node.top * (HEIGHT / 2) }px)"

              as

"transform:translate(${node.top * (WIDTH / 2)}px, ${
node.left * (HEIGHT / 2)
}px)`"

       the node is changed. But the connector/link isnt changing/ transforming. is there any way?

Tree view stretched too much

I've noticed that my oldest (top) part of the tree is super stretched - like it's trying to fit to the younger (bottom) branches containing more people (and taking more space). The older/top part of the tree is only a handful of people and I would like to see it more compressed, so the horizontal connecting lines are not stretched that far... Please see the attached file. Any ideas how to deal with this are very welcome.

tree stretched

Doc

Please write documentation

Spouse position is not suitable

I have a condition where someone has more than 2 wives, namely he has 10 wives with the status of deceased and divorced, the expectation is that the position of the wife will be next to him with the position of 5 on the right and 5 on the left, but what happens is that 9 wives are on the left and 1 wife on the right. how can I make the position of all wives match my expectations.

image

Family Tree Nodes are not being translated

image

Hi there, first of all thank you so much for this library. I tried using your library and this is what results. The connectors are showing up but the Cards are not being moved to where it is supposed to be. If you want to look at my code it is at

Not sure what to do, would you be able to help me? Thanks so much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.