dTree icon indicating copy to clipboard operation
dTree copied to clipboard

[REQUEST] dotted line for divorced marriage

Open sihendri opened this issue 3 years ago • 3 comments

Hi...

I love your works. It help a lot creating my family tree. I don't want to call this as an issue. I just want to request to add a feature: dotted line for a divorced marriage.

I need to keep that information and display it on the tree, in case there is an ex couples have children, just to find out who is their biological parents... so the line to the children still from their biological parents.

and is it possible to have more than one spouse? because my great great grandparents have 3 wives..

sorry if hard for you to understand my words. English is not my primary language

sihendri avatar Dec 07 '21 08:12 sihendri

Multiple spouses is easy just add another marriage object to the marriages array with the spouse and children like so:

"marriages": [
        {
            "spouse": {
                "name": "spouse0"
            }
        },
        {
            "spouse": {
                "name": "spouse1"
            },
            "children": {
               "name":  "child0"
        }
    ]

nelind3 avatar Dec 22 '21 22:12 nelind3

The above overwrites spouse0 with spouse1 in the graph, does not add another node. I'm also looking to add a second marriage to an individual. Any ideas on where to start?

m-miller avatar Jan 21 '23 01:01 m-miller

The above overwrites spouse0 with spouse1 in the graph, does not add another node. I'm also looking to add a second marriage to an individual. Any ideas on where to start?

treeData = [{
  "name": "Men",
  "marriages": [{
    "spouse": {
      "name": "Women 1",
    },
  },
  {
    "spouse": {
      "name": "Women 2",
    },
  }],
}];

dTree.init(treeData, $options);

eroffa avatar Feb 11 '23 06:02 eroffa