treeFilter option#1611
Conversation
| ) | ||
| ) | ||
| ] | ||
| ? treeLayout === Tree || treeLayout === Cluster |
There was a problem hiding this comment.
I just hard-coded this to apply only to the “tidy” tree and cluster layouts (and thereby avoiding it for the indent layout), but we could make this a separate option and use this heuristic as the default.
There was a problem hiding this comment.
It's probably nicer (for dev exploration at least) to give function implementations of layouts the same "powers" that named layout have. An alternative if we don't want this to be a user-facing option, is to read a special property (.balancedLabels?) on the layout function. (The two layouts from D3 would be tested like you do here.)
There was a problem hiding this comment.
I’m in favor of an option if you want to make it configurable (and not some alternative mechanism). Perhaps a textBalanced boolean option? Or you could even override the textAnchor option to be mirrored maybe, but perhaps that’s fancier than it needs to be.
Ref. #1610 (review)