dTree icon indicating copy to clipboard operation
dTree copied to clipboard

Add support for marriages for spouses

Open zaheer1389 opened this issue 8 years ago • 8 comments

var treeData =[  
   {  
      "name":"Abc Xyz",
      "class":"man",
      "id":"121",
      "marriages":[  
         {  
            "spouse":{  
               "name":"Jane",
               "class":"woman",
               "id":"122",
               "marriages":[  
                  {  
                     "spouse":{  
                        "name":"Jill",
                        "class":"man",
                        "id":"2304"
                     },
                     "children":[  
                        {  
                           "name":"Abc Xyz",
                           "class":"man",
                           "id":"142"
                        }
                     ]
                  }
               ]
            },
            "children":[  
               {  
                  "name":"Abc Xyz",
                  "class":"man",
                  "id":"131"
               },
               {  
                  "name":"Abc Xyz",
                  "class":"man",
                  "id":"132",
                  "marriages":[  
                     {  
                        "spouse":{  
                           "name":"Abc Xyz",
                           "class":"woman",
                           "id":"141"
                        },
                        "children":[  
                           {  
                              "name":"Abc Xyz",
                              "class":"man",
                              "id":"142"
                           }
                        ]
                     }
                  ]
               },
               {  
                  "name":"Abc Xyz",
                  "class":"man",
                  "id":"133"
               }
            ]
         }
      ]
   }
];

When used above json object dTree is not showing marriages of Jane

zaheer1389 avatar Apr 27 '17 07:04 zaheer1389

Yes that, is because spouses can't have marriages. It would be a nice feature but is currently not supported.

ErikGartner avatar Apr 27 '17 08:04 ErikGartner

also how to add parent of spouses?

zaheer1389 avatar Apr 27 '17 08:04 zaheer1389

Also not supported yet. Feel free to make a pull request solving either issue. :-)

ErikGartner avatar Apr 27 '17 08:04 ErikGartner

Adding to the complexity, what changes would be necessary for the JSON representation for remarriage to a related individual? I don't think that's possible with the current data structure.

A historical example would be Catherine of Aragon, the widow of Arthur Tudor who later married his brother Henry VIII of England. The story of Tamar from the Hebrew Bible provides an even more complex example.

shelleyvadams avatar May 16 '17 15:05 shelleyvadams

@shelleyvadams I think that would be solved best by referring to nodes in the tree. That is the first time the node is defined you manually assign it an identifier and then you can reference that node in other places.

ErikGartner avatar May 16 '17 16:05 ErikGartner

yeah - it would be nice to be able to refer to other nodes in the tree as needed.

I would like to start to add in further ancesters to spouses, though it gets to a point where it is too wide ranging, and would become a mess.

Is this still being developed at all? and d oyou have any examples of people who have made their family tree in it??

palitu avatar Jun 13 '17 05:06 palitu

@ErikGartner Are these features supported now ?

aroraank avatar Aug 17 '18 11:08 aroraank

Sorry, I don't have the time to work on new features for dTree. Feel free to make a pull request if you have a good solution :)

ErikGartner avatar Aug 17 '18 11:08 ErikGartner