Skip to content

Commit

Permalink
🚧 update accessing of displayOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Sep 13, 2024
1 parent f962b47 commit 1c0ad29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tree/phyloTree/layouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ export const calcYValues = (nodes, spacing = "even") => {
return;
}
/* if here, then all children have yvalues, but we dont. */
node.displayOrder = children.reduce((acc, d) => acc + d.displayOrder, 0) / children.length;
node.displayOrderRange = [children[0].displayOrder, children[children.length - 1].displayOrder];
node.displayOrder = children.reduce((acc, d) => acc + d.shell.displayOrder, 0) / children.length;
node.displayOrderRange = [children[0].shell.displayOrder, children[children.length - 1].shell.displayOrder];
};
recurse(nodes[0]);
};
Expand Down

0 comments on commit 1c0ad29

Please sign in to comment.