# HG changeset patch # User domruf # Date 2016-10-11 18:49:16 # Node ID 16234f629cfb258e5eee8ae3caddfe1881b09ef8 # Parent e285bb7abb281f833426c66492ccb1066a2c8e71 graph: align dots on middle of first element in cell instead of middle of table row diff --git a/kallithea/public/js/graph.js b/kallithea/public/js/graph.js --- a/kallithea/public/js/graph.js +++ b/kallithea/public/js/graph.js @@ -112,8 +112,10 @@ function BranchRenderer(canvas_id, conte 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];