From 058ee52333e9fd445d082efb06e603e5c8359e7f Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 2 Jul 2020 11:46:06 +0100 Subject: [PATCH] Fix gitgraph branch continues after merge (#12044) (#12105) Backport #12044 * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind --- web_src/js/vendor/gitgraph.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web_src/js/vendor/gitgraph.js b/web_src/js/vendor/gitgraph.js index 0a780c1eb..0cf5d0f75 100644 --- a/web_src/js/vendor/gitgraph.js +++ b/web_src/js/vendor/gitgraph.js @@ -372,6 +372,10 @@ export default function gitGraph(canvas, rawGraphList, config) { inlineIntersect = false; } + if (colomn === '|' && currentRow[colomnIndex - 1] && currentRow[colomnIndex - 1] === '\\') { + flows.splice(colomnIndex, 0, genNewFlow()); + } + color = flows[colomnIndex].color; switch (colomn) { @@ -387,6 +391,9 @@ export default function gitGraph(canvas, rawGraphList, config) { break; case '|': + if (prevColomn && prevColomn === '\\') { + x += config.unitSize; + } drawLineUp(x, y, color); break;