mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-04 16:16:41 +02:00
Reposition const declaration to ideal place
This commit is contained in:
@@ -116,7 +116,6 @@ const drawCommits = (svg, commits, modifyGraph) => {
|
|||||||
const commitStep = 40;
|
const commitStep = 40;
|
||||||
sortedKeys.forEach((key) => {
|
sortedKeys.forEach((key) => {
|
||||||
const commit = commits[key];
|
const commit = commits[key];
|
||||||
const posWithOffset = pos + layoutOffset;
|
|
||||||
|
|
||||||
if (isParallelCommits) {
|
if (isParallelCommits) {
|
||||||
if (!commit.parents.length) {
|
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 y = dir === 'TB' ? posWithOffset : branchPos[commit.branch].pos;
|
||||||
const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset;
|
const x = dir === 'TB' ? branchPos[commit.branch].pos : posWithOffset;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user