@@ -44,24 +44,11 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||
|
44 | 44 | y = commit_table_rows[max_rdmid - commit.rdmid].getLayout().get('top') - graph_y_offset + CIRCLE_INROW_OFFSET; |
|
45 | 45 | x = graph_x_offset + XSTEP / 2 + XSTEP * commit.space; |
|
46 | 46 | |
|
47 | revisionGraph.circle(x, y, 3).attr({fill: colors[commit.space], stroke: 'none'}); | |
|
48 | ||
|
49 | // title | |
|
50 | if (commit.refs != null && commit.refs != '') { | |
|
51 | longrefs = commit.refs; | |
|
52 | shortrefs = longrefs.length > 15 ? longrefs.substr(0, 13) + '...' : longrefs; | |
|
53 | ||
|
54 | label = revisionGraph.text(x + 5, y + 5, shortrefs) | |
|
55 | .attr({ | |
|
56 | font: '12px Fontin-Sans, Arial', | |
|
57 | fill: '#666', | |
|
58 | title: longrefs, | |
|
59 | cursor: 'pointer', | |
|
60 | rotation: '0'}); | |
|
61 | ||
|
62 | labelBBox = label.getBBox(); | |
|
63 | label.translate(labelBBox.width / 2, -labelBBox.height / 3); | |
|
64 | } | |
|
47 | revisionGraph.circle(x, y, 3) | |
|
48 | .attr({ | |
|
49 | fill: colors[commit.space], | |
|
50 | stroke: 'none', | |
|
51 | }).toFront(); | |
|
65 | 52 | |
|
66 | 53 | // paths to parents |
|
67 | 54 |
|
@@ -89,16 +76,25 function drawRevisionGraph(holder, commits_hash, graph_space) { | |||
|
89 | 76 | 'M', x, y, |
|
90 | 77 | 'V', graph_bottom]); |
|
91 | 78 | } |
|
92 | path.attr({stroke: colors[commit.space], "stroke-width": 1.5}); | |
|
79 | path.attr({stroke: colors[commit.space], "stroke-width": 1.5}).toBack(); | |
|
93 | 80 | }); |
|
94 | 81 | |
|
95 |
|
|
|
82 | revision_dot_overlay = revisionGraph.circle(x, y, 10); | |
|
83 | revision_dot_overlay | |
|
96 | 84 | .attr({ |
|
97 |
|
|
|
85 | fill: '#000', | |
|
98 | 86 | opacity: 0, |
|
99 | cursor: 'pointer', | |
|
100 |
href: commit.href |
|
|
101 | .hover(function () {}, function () {})); | |
|
87 | cursor: 'pointer', | |
|
88 | href: commit.href | |
|
89 | }); | |
|
90 | ||
|
91 | if(commit.refs != null && commit.refs.length > 0) { | |
|
92 | title = document.createElementNS(revisionGraph.canvas.namespaceURI, 'title'); | |
|
93 | title.appendChild(document.createTextNode(commit.refs)); | |
|
94 | revision_dot_overlay.node.appendChild(title); | |
|
95 | } | |
|
96 | ||
|
97 | top.push(revision_dot_overlay); | |
|
102 | 98 | }); |
|
103 | 99 | |
|
104 | 100 | top.toFront(); |
General Comments 0
You need to be logged in to leave comments.
Login now