Commit 14c2a37da218ca5ca23918d4787113644e1fd1cc

Authored by Sato Hiroyuki
1 parent 38fce3de

A tip is made slanting.

Showing 1 changed file with 25 additions and 11 deletions   Show diff stats
app/assets/javascripts/branch-graph.js
@@ -132,17 +132,31 @@ @@ -132,17 +132,31 @@
132 }); 132 });
133 133
134 } else if (c.space < this.commits[i].space) { 134 } else if (c.space < this.commits[i].space) {
135 - r.path([  
136 - "M", x - 5, y,  
137 - "l-5-2,0,4,5,-2",  
138 - "L", x - 10, y,  
139 - "L", x - 15, psy,  
140 - "L", cx + 5, psy,  
141 - "L", cx, cy])  
142 - .attr({  
143 - stroke: this.colors[this.commits[i].space],  
144 - "stroke-width": 2  
145 - }); 135 + if (y == psy) {
  136 + r.path([
  137 + "M", x - 5, y,
  138 + "l-5,-2,0,4,5,-2",
  139 + "L", x - 10, y,
  140 + "L", x - 15, psy,
  141 + "L", cx + 5, psy,
  142 + "L", cx, cy])
  143 + .attr({
  144 + stroke: this.colors[this.commits[i].space],
  145 + "stroke-width": 2
  146 + });
  147 + } else {
  148 + r.path([
  149 + "M", x - 3, y - 6,
  150 + "l-4,-3,4,-2,0,5",
  151 + "L", x - 5, y - 10,
  152 + "L", x - 10, psy,
  153 + "L", cx + 5, psy,
  154 + "L", cx, cy])
  155 + .attr({
  156 + stroke: this.colors[this.commits[i].space],
  157 + "stroke-width": 2
  158 + });
  159 + }
146 } else { 160 } else {
147 r.path([ 161 r.path([
148 "M", x - 3, y + 6, 162 "M", x - 3, y + 6,