@@ -21,11 +21,12 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||||
21 | var top = revisionGraph.set(); |
|
21 | var top = revisionGraph.set(); | |
22 |
|
22 | |||
23 | // init dimensions |
|
23 | // init dimensions | |
24 | var graph_offset = $(holder).getLayout().get('top'), |
|
24 | var graph_x_offset = Element.select(commit_table_rows.first(),'td').first().getLayout().get('left') - $(holder).getLayout().get('left'), | |
25 | graph_width = (graph_space + 1) * XSTEP, |
|
25 | graph_y_offset = $(holder).getLayout().get('top'), | |
26 | graph_height = commit_table_rows[max_rdmid].getLayout().get('top') + commit_table_rows[max_rdmid].getLayout().get('height') - graph_offset; |
|
26 | graph_right_side = graph_x_offset + (graph_space + 1) * XSTEP, | |
|
27 | graph_bottom = commit_table_rows.last().getLayout().get('top') + commit_table_rows.last().getLayout().get('height') - graph_y_offset; | |||
27 |
|
28 | |||
28 |
revisionGraph.setSize(graph_ |
|
29 | revisionGraph.setSize(graph_right_side, graph_bottom); | |
29 |
|
30 | |||
30 | // init colors |
|
31 | // init colors | |
31 | var colors = []; |
|
32 | var colors = []; | |
@@ -40,8 +41,8 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||||
40 |
|
41 | |||
41 | commits.each(function(commit) { |
|
42 | commits.each(function(commit) { | |
42 |
|
43 | |||
43 | y = commit_table_rows[max_rdmid - commit.rdmid].getLayout().get('top') - graph_offset + CIRCLE_INROW_OFFSET; |
|
44 | y = commit_table_rows[max_rdmid - commit.rdmid].getLayout().get('top') - graph_y_offset + CIRCLE_INROW_OFFSET; | |
44 | x = XSTEP / 2 + XSTEP * commit.space; |
|
45 | x = graph_x_offset + XSTEP / 2 + XSTEP * commit.space; | |
45 |
|
46 | |||
46 | revisionGraph.circle(x, y, 3).attr({fill: colors[commit.space], stroke: 'none'}); |
|
47 | revisionGraph.circle(x, y, 3).attr({fill: colors[commit.space], stroke: 'none'}); | |
47 |
|
48 | |||
@@ -67,8 +68,8 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||||
67 | parent_commit = commits_by_scmid.get(parent_scmid); |
|
68 | parent_commit = commits_by_scmid.get(parent_scmid); | |
68 |
|
69 | |||
69 | if (parent_commit) { |
|
70 | if (parent_commit) { | |
70 | parent_y = commit_table_rows[max_rdmid - parent_commit.rdmid].getLayout().get('top') - graph_offset + CIRCLE_INROW_OFFSET; |
|
71 | parent_y = commit_table_rows[max_rdmid - parent_commit.rdmid].getLayout().get('top') - graph_y_offset + CIRCLE_INROW_OFFSET; | |
71 | parent_x = XSTEP / 2 + XSTEP * parent_commit.space; |
|
72 | parent_x = graph_x_offset + XSTEP / 2 + XSTEP * parent_commit.space; | |
72 |
|
73 | |||
73 | if (parent_commit.space == commit.space) { |
|
74 | if (parent_commit.space == commit.space) { | |
74 | // vertical path |
|
75 | // vertical path | |
@@ -86,7 +87,7 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||||
86 | // vertical path ending at the bottom of the revisionGraph |
|
87 | // vertical path ending at the bottom of the revisionGraph | |
87 | path = revisionGraph.path([ |
|
88 | path = revisionGraph.path([ | |
88 | 'M', x, y, |
|
89 | 'M', x, y, | |
89 |
'V', graph_ |
|
90 | 'V', graph_bottom]); | |
90 | } |
|
91 | } | |
91 | path.attr({stroke: colors[commit.space], "stroke-width": 1.5}); |
|
92 | path.attr({stroke: colors[commit.space], "stroke-width": 1.5}); | |
92 | }); |
|
93 | }); |
@@ -4,7 +4,7 table.revision-info td { | |||||
4 | padding: 0px; |
|
4 | padding: 0px; | |
5 | } |
|
5 | } | |
6 |
|
6 | |||
7 |
div.revision-graph { position: absolute; |
|
7 | div.revision-graph { position: absolute; } | |
8 |
|
8 | |||
9 | div.changeset-changes ul { margin: 0; padding: 0; } |
|
9 | div.changeset-changes ul { margin: 0; padding: 0; } | |
10 | div.changeset-changes ul > ul { margin-left: 18px; padding: 0; } |
|
10 | div.changeset-changes ul > ul { margin-left: 18px; padding: 0; } |
General Comments 0
You need to be logged in to leave comments.
Login now