# HG changeset patch # User domruf # Date 1476204556 -7200 # Node ID 16234f629cfb258e5eee8ae3caddfe1881b09ef8 # Parent e285bb7abb281f833426c66492ccb1066a2c8e71 graph: align dots on middle of first element in cell instead of middle of table row diff -r e285bb7abb28 -r 16234f629cfb kallithea/public/js/graph.js --- 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];