1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-02 16:24:25 +00:00

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 <art27@cantab.net>

* Update web_src/js/vendor/gitgraph.js

* Apply suggestions from code review

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
zeripath 2020-07-02 11:46:06 +01:00 committed by GitHub
parent 47b1fc5149
commit 058ee52333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;