orderForLeafNames
function orderForLeafNames( tree, selection, leafNames): Record<string, string[]>;Defined in: packages/components/src/components/PhyloTree/utils/treeOps.ts:73
A selection.order that makes the tree’s leaves follow leafNames as closely as its topology
allows: every node’s children are sorted by the earliest position any of their leaves has in
leafNames (leaves not listed sort last, keeping their relative order). Used to make a tree
follow rows the user reordered in an alignment.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
tree |
Tree |
selection |
Partial<TreeSelection> |
leafNames |
readonly string[] |
Returns
Section titled “Returns”Record<string, string[]>