The issue I’m facing is that identical twins (Twin A and Twin B) are always positioned on the last generation. I tried setting isLayoutPositioned to false on twin link nodes (TLN1, TLN2) but that just made twin link (TL) disappear. Is there any way I could position them on their respective generation?
My guess is that you are unintentionally setting up what the GenogramLayout is treating as a “parent” vertex, thereby resulting in the extra generation or layer.
I think what you are doing is different from what the “setup…” functions do in order to convert the given data into a GraphLinksModel that supports GenogramLayout and features such as specialized links for identical twins. Note the differences between what your code is doing and what the setupIdenticalTwins function does.
You don’t have any problems with regular twins, do you?
I don’t have any problems with regular twins (see Bill, Claire and Carol).
I’m not sure where can I find the setupIdenticalTwins function you are refering to. The one I used is from this topic which is dealing with the same issue.
I see now, you were refering to Genogram twins example. The only difference I see is that I’m adding twin link nodes for anchoring the twin link in the center of the twin-parent links. Is there a way to anchor it without using twin link nodes or a way to make these nodes not to act like parent vertex?
In this design, identical twins are (indirectly) connected with a “TwinLink” category Link. I started explaining it but then realized that your app is using code that is different from what is used in that Genogram Twins sample.
In the unsupported sample that we created long ago, the blue link connecting twins connects at the top of the node. In your app, the link appears to connect the middle of the last segment. Or perhaps slightly higher than middle. So I’m not sure what the best advice should be.
Thanks for the CodePen. The problem is that adding label nodes to parent-child links caused confusion in both setup and GenogramLayout, since it violates the previous assumption that any link with a label node would be a “Marriage” link.
Here’s an updated sample. Note that I have renamed the custom Link class and the additional link template different names, since having both be named “TwinLink” was very confusing.