Revision graph sometimes broken (#11612).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10369 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-09-11 16:55:32 +00:00
parent 049aa3971d
commit 745c5d053e
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,9 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {
var path, title;
var revision_dot_overlay;
$.each(commits, function(index, commit) {
if (!commit.hasOwnProperty("space"))
commit.space = 0;
y = commit_table_rows.eq(max_rdmid - commit.rdmid).position().top - graph_y_offset + CIRCLE_INROW_OFFSET;
x = graph_x_offset + XSTEP / 2 + XSTEP * commit.space;
revisionGraph.circle(x, y, 3)
@ -46,6 +49,9 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {
$.each(commit.parent_scmids, function(index, parent_scmid) {
parent_commit = commits_by_scmid[parent_scmid];
if (parent_commit) {
if (!parent_commit.hasOwnProperty("space"))
parent_commit.space = 0;
parent_y = commit_table_rows.eq(max_rdmid - parent_commit.rdmid).position().top - graph_y_offset + CIRCLE_INROW_OFFSET;
parent_x = graph_x_offset + XSTEP / 2 + XSTEP * parent_commit.space;
if (parent_commit.space == commit.space) {