summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-02-27 22:55:37 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-02-28 11:44:52 +0900
commit14c2a37da218ca5ca23918d4787113644e1fd1cc (patch)
tree5f5581f7bc457433f1ba480098ca5709281836f5
parent38fce3deb03904fdfcf2fe512b094d49e22fe61c (diff)
downloadgitlab-ce-14c2a37da218ca5ca23918d4787113644e1fd1cc.tar.gz
A tip is made slanting.
-rw-r--r--app/assets/javascripts/branch-graph.js36
1 files changed, 25 insertions, 11 deletions
diff --git a/app/assets/javascripts/branch-graph.js b/app/assets/javascripts/branch-graph.js
index fb22953acd2..231b1cc6744 100644
--- a/app/assets/javascripts/branch-graph.js
+++ b/app/assets/javascripts/branch-graph.js
@@ -132,17 +132,31 @@
});
} else if (c.space < this.commits[i].space) {
- r.path([
- "M", x - 5, y,
- "l-5-2,0,4,5,-2",
- "L", x - 10, y,
- "L", x - 15, psy,
- "L", cx + 5, psy,
- "L", cx, cy])
- .attr({
- stroke: this.colors[this.commits[i].space],
- "stroke-width": 2
- });
+ if (y == psy) {
+ r.path([
+ "M", x - 5, y,
+ "l-5,-2,0,4,5,-2",
+ "L", x - 10, y,
+ "L", x - 15, psy,
+ "L", cx + 5, psy,
+ "L", cx, cy])
+ .attr({
+ stroke: this.colors[this.commits[i].space],
+ "stroke-width": 2
+ });
+ } else {
+ r.path([
+ "M", x - 3, y - 6,
+ "l-4,-3,4,-2,0,5",
+ "L", x - 5, y - 10,
+ "L", x - 10, psy,
+ "L", cx + 5, psy,
+ "L", cx, cy])
+ .attr({
+ stroke: this.colors[this.commits[i].space],
+ "stroke-width": 2
+ });
+ }
} else {
r.path([
"M", x - 3, y + 6,