Mercurial > public > mercurial-scm > hg
diff tests/test-hgweb-empty.t @ 35529:5afe0ca59b07
paper: make actual changeset entries have backgrounds on /graph
This patch removes a separate container for backgrounds only and puts
backgrounds on changeset elements themselves. This makes it so that JS code
doesn't need to create background elements separately anymore.
There's a bit of manipulating positions of elements: every changeset entry has
a "fg" element that gets a higher z-index than <canvas> element. This
prioritizes text information, so that even if it somehow gets close to the
graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
This can happen if commit message has a long first line and browser window is
narrow, for example.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 05 Jan 2018 18:46:06 +0800 |
parents | 56854848e485 |
children | 45a816361926 |
line wrap: on
line diff
--- a/tests/test-hgweb-empty.t Thu Jan 04 12:34:40 2018 +0100 +++ b/tests/test-hgweb-empty.t Fri Jan 05 18:46:06 2018 +0800 @@ -294,21 +294,14 @@ <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript> <div id="wrapper"> - <ul id="nodebgs" class="stripes2"></ul> <canvas id="graph"></canvas> - <ul id="graphnodes"></ul> + <ul id="graphnodes" class="stripes2"></ul> </div> <script type="text/javascript"> var data = []; var graph = new Graph(); graph.scale(39); - - graph.vertex = function(x, y, radius, color, parity, cur) { - Graph.prototype.vertex.apply(this, arguments); - return ['<li class="bg"></li>', '']; - } - graph.render(data); </script>