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 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/graph.js
Show inline comments
 
@@ -98,28 +98,38 @@ function BranchRenderer() {
 
					this.max_column = end;
 
				}
 
				
 
				this.setColor(color, 0.0, 0.65);
 
				
 
				y = row.offsetTop-rela.offsetTop+row.offsetHeight/2;
 
				x = pad-((this.cell[0] + this.box_size * start - 1) + this.bg_height-2);
 
				
 
				this.ctx.lineWidth=this.line_width;
 
				this.ctx.beginPath();
 
				this.ctx.moveTo(x, y);
 

	
 
				
 
				if (start == end)
 
				{
 
					x = pad-((1 + this.box_size * end) + this.bg_height-2);
 
				y += row.offsetHeight;
 
				
 
				x = pad-((1 + this.box_size * end) + this.bg_height-2);
 
				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();
 
			}
 
			
 
			column = node[0]
 
			color = node[1]
 
			
 
			radius = this.dot_radius;
 
			y = row.offsetTop-rela.offsetTop+row.offsetHeight/2;
 
			x = pad-(Math.round(this.cell[0] * scale/2 * column + radius) + 15 - (column*4));
 
		
 
			this.ctx.beginPath();
 
			this.setColor(color, 0.25, 0.75);
0 comments (0 inline, 0 general)