Mercurial > hg
comparison tests/test-hgweb-commands.t @ 16137:8fd18eb8aab7
templates: move Graph.edge() implementation in mercurial.js
All implementation in graph.tmpl are the same. It can still be overriden if
necessary. There is no clear reason to keep it separated from mercurial.js.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 17 Feb 2012 16:49:43 +0100 |
parents | 33f702e52906 |
children | 6e4de55a41a4 |
comparison
equal
deleted
inserted
replaced
16136:68007f0557de | 16137:8fd18eb8aab7 |
---|---|
959 | 959 |
960 var data = [["ba87b23d29ca", [0, 1], [[0, 0, 1, {"color": "FF0000", "width": "3"}]], "branch", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1, {"width": "3"}]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, {"width": "3"}]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; | 960 var data = [["ba87b23d29ca", [0, 1], [[0, 0, 1, {"color": "FF0000", "width": "3"}]], "branch", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1, {"width": "3"}]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, {"width": "3"}]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; |
961 var graph = new Graph(); | 961 var graph = new Graph(); |
962 graph.scale(39); | 962 graph.scale(39); |
963 | 963 |
964 graph.edge = function(x0, y0, x1, y1, color) { | |
965 | |
966 this.setColor(color, 0.0, 0.65); | |
967 this.ctx.beginPath(); | |
968 this.ctx.moveTo(x0, y0); | |
969 this.ctx.lineTo(x1, y1); | |
970 this.ctx.stroke(); | |
971 | |
972 } | |
973 | |
974 var revlink = '<li style="_STYLE"><span class="desc">'; | 964 var revlink = '<li style="_STYLE"><span class="desc">'; |
975 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>'; | 965 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>'; |
976 revlink += '</span> _TAGS'; | 966 revlink += '</span> _TAGS'; |
977 revlink += '<span class="info">_DATE, by _USER</span></li>'; | 967 revlink += '<span class="info">_DATE, by _USER</span></li>'; |
978 | 968 |