# HG changeset patch # User Mads Kiilerich # Date 2017-06-19 00:53:47 # Node ID d2053b8ab873c10f1eb6ed01900d2b08dd329095 # Parent 8931078f70dbb76dbee040dc83b1185b2b7689f2 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. 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 @@ -113,8 +113,8 @@ function BranchRenderer(canvas_id, conte 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);