Changeset - d2053b8ab873
[Not reviewed]
default
0 1 0
Mads Kiilerich - 8 years ago 2017-06-19 00:53:47
mads@kiilerich.com
graph: align the dots with the middle of the first *visible* child element

The changelog graph will have invisible first elements when a range is
selected. That caused an odd graph. Fixed by adding the :visible selector that
was lost in 5258b66bf5d7.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/graph.js
Show inline comments
 
@@ -110,14 +110,14 @@ function BranchRenderer(canvas_id, conte
 
			bumped_node = cur[4];
 
			divergent_node = cur[5];
 
			extinct_node = cur[6];
 
			unstable_node = cur[7];
 

	
 
			// center dots on the first element in a td (not necessarily the first one, but there must be one)
 
			var firstincell = $(row).find('td>*')[0];
 
			var nextFirstincell = $(next).find('td>*')[0];
 
			var firstincell = $(row).find('td>*:visible')[0];
 
			var nextFirstincell = $(next).find('td>*:visible')[0];
 
			var rowY = Math.floor(row.offsetTop + firstincell.offsetTop + firstincell.offsetHeight/2);
 
			var nextY = Math.floor((next == null) ? rowY + row.offsetHeight/2 : next.offsetTop + nextFirstincell.offsetTop + nextFirstincell.offsetHeight/2);
 

	
 
			for (var j in in_l) {
 
				line = in_l[j];
 
				start = line[0];
0 comments (0 inline, 0 general)