changeset 6698:d2053b8ab873

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.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 19 Jun 2017 00:53:47 +0200
parents 8931078f70db
children 428c1193ee40
files kallithea/public/js/graph.js
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/graph.js	Sat Jun 17 21:51:39 2017 +0200
+++ b/kallithea/public/js/graph.js	Mon Jun 19 00:53:47 2017 +0200
@@ -113,8 +113,8 @@
 			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);