Changeset - 941437fdfe59
[Not reviewed]
beta
0 1 0
Aras Pranckevicius - 14 years ago 2012-01-08 11:34:09
aras@unity3d.com
graph: bezier curve for curved merge lines
1 file changed with 13 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/graph.js
Show inline comments
 
@@ -107,10 +107,20 @@ function BranchRenderer() {
 
				this.ctx.beginPath();
 
				this.ctx.moveTo(x, y);
 

	
 
				y += row.offsetHeight;
 
				
 
				x = pad-((1 + this.box_size * end) + this.bg_height-2);
 
				this.ctx.lineTo(x,y+extra,3);
 
				if (start == end)
 
				{
 
					x = pad-((1 + this.box_size * end) + this.bg_height-2);
 
					y += row.offsetHeight;
 
					this.ctx.lineTo(x,y+extra,3);
 
				}
 
				else
 
				{
 
					var x2 = pad-((1 + this.box_size * end) + this.bg_height-2);
 
					var y2 = y + row.offsetHeight;
 
					var ymid = (y+y2) / 2;
 
					this.ctx.bezierCurveTo (x,ymid,x2,ymid,x2,y2);
 
				}
 
				this.ctx.stroke();
 
			}
 
			
0 comments (0 inline, 0 general)