57 |
57 |
58 var data = {jsdata|json}; |
58 var data = {jsdata|json}; |
59 var graph = new Graph(); |
59 var graph = new Graph(); |
60 graph.scale({bg_height}); |
60 graph.scale({bg_height}); |
61 |
61 |
62 graph.edge = function(x0, y0, x1, y1, color) { |
62 graph.edge = function(x0, y0, x1, y1, color) \{ |
63 |
63 |
64 this.setColor(color, 0.0, 0.65); |
64 this.setColor(color, 0.0, 0.65); |
65 this.ctx.beginPath(); |
65 this.ctx.beginPath(); |
66 this.ctx.moveTo(x0, y0); |
66 this.ctx.moveTo(x0, y0); |
67 this.ctx.lineTo(x1, y1); |
67 this.ctx.lineTo(x1, y1); |
71 |
71 |
72 var revlink = '<li style="_STYLE"><span class="desc">'; |
72 var revlink = '<li style="_STYLE"><span class="desc">'; |
73 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
73 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>'; |
74 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>'; |
74 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>'; |
75 |
75 |
76 graph.vertex = function(x, y, color, parity, cur) { |
76 graph.vertex = function(x, y, color, parity, cur) \{ |
77 |
77 |
78 this.ctx.beginPath(); |
78 this.ctx.beginPath(); |
79 color = this.setColor(color, 0.25, 0.75); |
79 color = this.setColor(color, 0.25, 0.75); |
80 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
80 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); |
81 this.ctx.fill(); |
81 this.ctx.fill(); |
90 item = item.replace(/_DESC/, cur[3]); |
90 item = item.replace(/_DESC/, cur[3]); |
91 item = item.replace(/_USER/, cur[4]); |
91 item = item.replace(/_USER/, cur[4]); |
92 item = item.replace(/_DATE/, cur[5]); |
92 item = item.replace(/_DATE/, cur[5]); |
93 |
93 |
94 var tagspan = ''; |
94 var tagspan = ''; |
95 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { |
95 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{ |
96 tagspan = '<span class="logtags">'; |
96 tagspan = '<span class="logtags">'; |
97 if (cur[6][1]) { |
97 if (cur[6][1]) \{ |
98 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">'; |
98 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">'; |
99 tagspan += cur[6][0] + '</span> '; |
99 tagspan += cur[6][0] + '</span> '; |
100 } else if (!cur[6][1] && cur[6][0] != 'default') { |
100 } else if (!cur[6][1] && cur[6][0] != 'default') \{ |
101 tagspan += '<span class="branchname" title="' + cur[6][0] + '">'; |
101 tagspan += '<span class="branchname" title="' + cur[6][0] + '">'; |
102 tagspan += cur[6][0] + '</span> '; |
102 tagspan += cur[6][0] + '</span> '; |
103 } |
103 } |
104 if (cur[7].length) { |
104 if (cur[7].length) \{ |
105 for (var t in cur[7]) { |
105 for (var t in cur[7]) \{ |
106 var tag = cur[7][t]; |
106 var tag = cur[7][t]; |
107 tagspan += '<span class="tag">' + tag + '</span> '; |
107 tagspan += '<span class="tag">' + tag + '</span> '; |
108 } |
108 } |
109 } |
109 } |
110 tagspan += '</span>'; |
110 tagspan += '</span>'; |