This commit is contained in:
Yash Singh
2024-05-03 21:12:40 -07:00
parent 1cbd730b8d
commit e2ca8e820e

View File

@@ -83,7 +83,8 @@ const findClosestParent = (parents) => {
let maxPosition = 0; let maxPosition = 0;
parents.forEach((parent) => { parents.forEach((parent) => {
const parentPosition = dir === 'TB' || dir === 'BT' ? commitPos.get(parent).y : commitPos.get(parent).x; const parentPosition =
dir === 'TB' || dir === 'BT' ? commitPos.get(parent).y : commitPos.get(parent).x;
if (parentPosition >= maxPosition) { if (parentPosition >= maxPosition) {
closestParent = parent; closestParent = parent;
maxPosition = parentPosition; maxPosition = parentPosition;