-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable links/paths between nodes #80
Comments
You can add your custom styles. /* Data object */
[{
/* ... */
marriages: [{
/* ... */
class: "node spouse",
/* ... */
},{
/* ... */
class: "node spouse spouse_current",
/* ... */
}]
}] /* stylesheets */
.spouse{
background-color: red;
}
.spouse_current{
background-color: green;
} |
Hi @ucay , thanks for the solution |
Sorry @aroraank , missing the "path" word 😄 https://github.com/ErikGartner/dTree/blob/master/src/builder.js#L93 WDYT, @ErikGartner ? |
Good question @aroraank and thanks for helping out @ucay! 🙂 Currently there is no way to do this. Though I would be open to merging a pull-request adding this feature as it is a good suggestion. A simpler class based solution makes if we can come up with a good and consistent way of addressing the path and everything that we want to do in terms of customize can be done in CSS (which I think is the case). We could add a class A callback based solution would make sense if we would want more powerful customization beyond what CSS allows for. The only problem is designing the callback with "enough" information to be able to determine the color of the path. It would need something like In general I'm open for merging any/both of these solutions as long as the solution is backwards compatible with the current format (i.e. adding an optional field or callback is fine). I think the class based solution probably is favorable and considerably simpler (here and here dTree currently sets the path class). Some code to propagate the class attribute in a similar manner as with /Erik |
// Draw siblings (marriage) { |
How i can show conditional custom paths styles for different spouses like example: green path for current spouse & red path for ex-spouse?
The text was updated successfully, but these errors were encountered: