changeset 6371:16234f629cfb

graph: align dots on middle of first element in cell instead of middle of table row
author domruf <dominikruf@gmail.com>
date Tue, 11 Oct 2016 18:49:16 +0200
parents e285bb7abb28
children e54f4d943d4a
files kallithea/public/js/graph.js
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/js/graph.js	Mon Dec 19 04:46:48 2016 +0100
+++ b/kallithea/public/js/graph.js	Tue Oct 11 18:49:16 2016 +0200
@@ -112,8 +112,10 @@
 			extinct_node = cur[6];
 			unstable_node = cur[7];
 
-			var rowY = row.offsetTop + row.offsetHeight/2;
-			var nextY = (next == null) ? rowY + row.offsetHeight/2 : next.offsetTop + next.offsetHeight/2;
+			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];