From 745c5d053e0d2c17a86736cb8a1fe7e5ae097391 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 11 Sep 2012 16:55:32 +0000 Subject: [PATCH] Revision graph sometimes broken (#11612). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10369 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/revision_graph.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/javascripts/revision_graph.js b/public/javascripts/revision_graph.js index fb57adda3..c389cb58e 100644 --- a/public/javascripts/revision_graph.js +++ b/public/javascripts/revision_graph.js @@ -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) {