Skip to content

Commit

Permalink
Fix gitgraph branch continues after merge (#12044)
Browse files Browse the repository at this point in the history
* 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 <art27@cantab.net>

* Update web_src/js/vendor/gitgraph.js

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
3 people authored Jun 25, 2020
1 parent ebc35f2 commit 0b1bb96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web_src/js/vendor/gitgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -387,6 +391,9 @@ export default function gitGraph(canvas, rawGraphList, config) {
break;

case '|':
if (prevColomn && prevColomn === '\\') {
x += config.unitSize;
}
drawLineUp(x, y, color);
break;

Expand Down

0 comments on commit 0b1bb96

Please sign in to comment.