Reposition const declaration to ideal place

This commit is contained in:
Matheus B 2024-01-22 19:56:25 -03:00
parent 3e87412e97
commit e668698b5c
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,6 @@ const drawCommits = (svg, commits, modifyGraph) => {
const commitStep = 40;
sortedKeys.forEach((key) => {
const commit = commits[key];
const posWithOffset = pos + layoutOffset;
if (isParallelCommits) {
if (!commit.parents.length) {
@ -133,6 +132,7 @@ const drawCommits = (svg, commits, modifyGraph) => {
}
}
const posWithOffset = pos + layoutOffset;
const y = dir === 'TB' ? posWithOffset : branchPos[commit.branch].pos;
const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset;