diff options
author | zeripath <art27@cantab.net> | 2020-06-25 12:37:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 14:37:28 +0300 |
commit | 0b1bb964413c3785e8b4d75e4242513af86bfdf5 (patch) | |
tree | 0884c80091953c71b294d5aebdfc79a606f7c92a /web_src | |
parent | ebc35f2b2e700b30d288b622cd9409a0f741e928 (diff) | |
download | gitea-0b1bb964413c3785e8b4d75e4242513af86bfdf5.tar.gz gitea-0b1bb964413c3785e8b4d75e4242513af86bfdf5.zip |
Fix gitgraph branch continues after merge (#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>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/vendor/gitgraph.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/web_src/js/vendor/gitgraph.js b/web_src/js/vendor/gitgraph.js index 0a780c1eb5..0cf5d0f75b 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; |