diff mercurial/templates/static/mercurial.js @ 16129:5e50982c633c

graph: in hgrc specify line width for main branch You can specify width to visually distinguish main branch (trunk) on hgweb's graph page. Settings format is branch_name.width = value, where width in px e.g.: [graph] default.width = 3
author Constantine Linnick <theaspect@gmail.com>
date Sun, 22 Jan 2012 19:35:26 +0700
parents 2e54387976d4
children 33f702e52906
line wrap: on
line diff
--- a/mercurial/templates/static/mercurial.js	Thu Feb 16 16:40:29 2012 -0600
+++ b/mercurial/templates/static/mercurial.js	Sun Jan 22 19:35:26 2012 +0700
@@ -112,9 +112,12 @@
 				y0 = this.bg[1] - this.bg_height / 2;
 				x1 = this.cell[0] + this.box_size * end + this.box_size / 2;
 				y1 = this.bg[1] + this.bg_height / 2;
-				
+				// Width if exists
+				if(line[3] && line[3]['width']){
+					this.ctx.lineWidth = line[3]['width'];
+				}
 				this.edge(x0, y0, x1, y1, color);
-				
+				this.ctx.lineWidth = 1;
 			}
 			
 			// Draw the revision node in the right column