Fixed some tech tree layout issues

This commit is contained in:
Anuken
2020-06-19 23:36:21 -04:00
parent 6bcc103cf7
commit f419de0fad
3 changed files with 34 additions and 10 deletions

View File

@@ -229,8 +229,7 @@ public class BranchTreeLayout implements TreeLayout{
TreeNode previousChild = null;
for(TreeNode w : v.children){
firstWalk(w, previousChild);
defaultAncestor = apportion(w, defaultAncestor, previousChild,
v);
defaultAncestor = apportion(w, defaultAncestor, previousChild, v);
previousChild = w;
}
executeShifts(v);
@@ -257,8 +256,7 @@ public class BranchTreeLayout implements TreeLayout{
}else if(alignment == TreeAlignment.towardsRoot){
y = levelStart + levelChangeSign * (getNodeThickness(v) / 2);
}else{
y = levelStart + levelSize - levelChangeSign
* (getNodeThickness(v) / 2);
y = levelStart + levelSize - levelChangeSign * (getNodeThickness(v) / 2);
}
if(!levelChangeOnYAxis){