Skip to content
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

Fix polytomy bounding box calculation. #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -36,14 +36,13 @@ class PolytomyHorizonCalc {
return changed;
}
calc_horizon(node) {
// Calculate parent's arcr based on our own.
// Calculate parent's arcr within our coordinate reference.
function parent_arcr(node) {
if (!node.upnode) return 0;

// NB: node.upnode.arcr can't be relied on at this point, so derive from nextr
for (let i = 0; i < node.upnode.children.length; i++) {
if (node.upnode.children[i] === node) {
return node.arcr / node.upnode.nextr[i];
return node.upnode.arcr / node.upnode.nextr[i];
}
}
}
Expand Down Expand Up @@ -82,4 +81,4 @@ class PolytomyHorizonCalc {

let polytomy_horizon_calc = new PolytomyHorizonCalc();

export default polytomy_horizon_calc;
export default polytomy_horizon_calc;