##// END OF EJS Templates
made graphg ticker, and fixes a paging bug caused grapgh disaligment
marcink -
r322:46b7d108 default
parent child Browse files
Show More
@@ -72,7 +72,7 b' class ChangelogController(BaseController'
72 if not repo.revisions:return dumps([]), 0
72 if not repo.revisions:return dumps([]), 0
73
73
74 max_rev = repo.revisions[-1]
74 max_rev = repo.revisions[-1]
75 offset = 1 if p == 1 else ((p - 1) * revcount)
75 offset = 1 if p == 1 else ((p - 1) * revcount + 1)
76 rev_start = repo.revisions[(-1 * offset)]
76 rev_start = repo.revisions[(-1 * offset)]
77
77
78 revcount = min(max_rev, revcount)
78 revcount = min(max_rev, revcount)
@@ -742,9 +742,6 b' p.files {'
742 }
742 }
743
743
744 /** end of changeset **/ /** canvas **/
744 /** end of changeset **/ /** canvas **/
745 #graph_nodes {
746 margin-top: 8px;
747 }
748
745
749 #graph {
746 #graph {
750 overflow: hidden;
747 overflow: hidden;
@@ -753,6 +750,8 b' p.files {'
753 #graph_nodes {
750 #graph_nodes {
754 width: 160px;
751 width: 160px;
755 float: left;
752 float: left;
753 margin-left:-50px;
754 margin-top: 5px;
756 }
755 }
757
756
758 #graph_content {
757 #graph_content {
@@ -774,7 +773,8 b' p.files {'
774 border-bottom: 1px solid #CCCCCC;
773 border-bottom: 1px solid #CCCCCC;
775 border-left: 1px solid #CCCCCC;
774 border-left: 1px solid #CCCCCC;
776 border-right: 1px solid #CCCCCC;
775 border-right: 1px solid #CCCCCC;
777 height: 120px;
776 min-height: 80px;
777 overflow: hidden;
778 }
778 }
779
779
780 #graph_content .container .left {
780 #graph_content .container .left {
@@ -1,5 +1,6 b''
1 // branch_renderer.js - Rendering of branch DAGs on the client side
1 // branch_renderer.js - Rendering of branch DAGs on the client side
2 //
2 //
3 // Copyright 2010 Marcin Kuzminski <marcin AT python-works DOT com>
3 // Copyright 2008 Jesper Noehr <jesper AT noehr DOT org>
4 // Copyright 2008 Jesper Noehr <jesper AT noehr DOT org>
4 // Copyright 2008 Dirkjan Ochtman <dirkjan AT ochtman DOT nl>
5 // Copyright 2008 Dirkjan Ochtman <dirkjan AT ochtman DOT nl>
5 // Copyright 2006 Alexander Schremmer <alex AT alexanderweb DOT de>
6 // Copyright 2006 Alexander Schremmer <alex AT alexanderweb DOT de>
@@ -32,7 +33,8 b' function BranchRenderer() {'
32 this.ctx.fillStyle = 'rgb(0, 0, 0)';
33 this.ctx.fillStyle = 'rgb(0, 0, 0)';
33 this.cur = [0, 0];
34 this.cur = [0, 0];
34 this.max_column = 1;
35 this.max_column = 1;
35 this.line_width = 3;
36 this.line_width = 2.5;
37 this.dot_radius = 5.5;
36 this.bg = [0, 4];
38 this.bg = [0, 4];
37 this.cell = [2, 0];
39 this.cell = [2, 0];
38 this.revlink = '';
40 this.revlink = '';
@@ -60,7 +62,7 b' function BranchRenderer() {'
60 var idx = 1;
62 var idx = 1;
61 var rela = document.getElementById('graph');
63 var rela = document.getElementById('graph');
62 var pad = 160;
64 var pad = 160;
63 var scale = 20;
65 var scale = 22;
64
66
65 for (var i in data) {
67 for (var i in data) {
66 this.scale(scale);
68 this.scale(scale);
@@ -102,20 +104,21 b' function BranchRenderer() {'
102
104
103 y = row.offsetTop-rela.offsetTop+4;
105 y = row.offsetTop-rela.offsetTop+4;
104 x = pad-((this.cell[0] + this.box_size * start - 1) + this.bg_height-2);
106 x = pad-((this.cell[0] + this.box_size * start - 1) + this.bg_height-2);
107 this.ctx.lineWidth=this.line_width;
105 this.ctx.beginPath();
108 this.ctx.beginPath();
106 this.ctx.moveTo(x, y);
109 this.ctx.moveTo(x, y);
107
110
108 //i don't know why it's +1 just fixes some drawing graph.
111 //i don't know why it's +1 just fixes some drawing graph.
109 y += row.clientHeight+1;
112 y += row.clientHeight+1;
110 x = pad-((1 + this.box_size * end) + this.bg_height-2);
113 x = pad-((1 + this.box_size * end) + this.bg_height-2);
111 this.ctx.lineTo(x,y+extra);
114 this.ctx.lineTo(x,y+extra,3);
112 this.ctx.stroke();
115 this.ctx.stroke();
113 }
116 }
114
117
115 column = node[0]
118 column = node[0]
116 color = node[1]
119 color = node[1]
117
120
118 radius = 4;
121 radius = this.dot_radius;
119 y = row.offsetTop-rela.offsetTop+4;
122 y = row.offsetTop-rela.offsetTop+4;
120 x = pad-(Math.round(this.cell[0] * scale/2 * column + radius) + 15 - (column*4));
123 x = pad-(Math.round(this.cell[0] * scale/2 * column + radius) + 15 - (column*4));
121
124
@@ -42,17 +42,17 b''
42 <div id="chg_${cnt+1}" class="container">
42 <div id="chg_${cnt+1}" class="container">
43 <div class="left">
43 <div class="left">
44 <div class="date">${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}</div>
44 <div class="date">${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}</div>
45 <span class="logtags">
46 <span class="branchtag">${cs.branch}</span>
47 %for tag in cs.tags:
48 <span class="tagtag">${tag}</span>
49 %endfor
50 </span>
45 <div class="author">${cs.author}</div>
51 <div class="author">${cs.author}</div>
46 <div class="message">
52 <div class="message">
47 ${h.link_to(h.wrap_paragraphs(cs.message),
53 ${h.link_to(h.wrap_paragraphs(cs.message),
48 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
54 h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
49 </div>
55 </div>
50 <span class="logtags">
51 <span class="branchtag">${cs.branch}</span>
52 %for tag in cs.tags:
53 <span class="tagtag">${tag}</span>
54 %endfor
55 </span>
56 </div>
56 </div>
57 <div class="right">
57 <div class="right">
58 <div class="changes">
58 <div class="changes">
General Comments 0
You need to be logged in to leave comments. Login now