summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-02-05 12:34:35 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-02-05 12:34:35 +0900
commit1e907498a944c22db79e9cfbd26ee7f10fe1a091 (patch)
treec55068f385c9c8297409e2fc6f3a9a0af116e772 /vendor
parent7812cb77c81cb199c7c8fd276130238ccabb856d (diff)
downloadgitlab-ce-1e907498a944c22db79e9cfbd26ee7f10fe1a091.tar.gz
The commit is marked and displayed in the center.
Diffstat (limited to 'vendor')
-rw-r--r--vendor/assets/javascripts/branch-graph.js21
1 files changed, 15 insertions, 6 deletions
diff --git a/vendor/assets/javascripts/branch-graph.js b/vendor/assets/javascripts/branch-graph.js
index 7929d3b2a14..fb22953acd2 100644
--- a/vendor/assets/javascripts/branch-graph.js
+++ b/vendor/assets/javascripts/branch-graph.js
@@ -161,14 +161,23 @@
if (this.commits[i].refs) {
this.appendLabel(x, y, this.commits[i].refs);
-
- // The main branch is displayed in the center.
- re = new RegExp('(^| )' + this.options.ref + '( |$)');
- if (this.commits[i].refs.match(re)) {
- scrollLeft = x - graphWidth / 2;
- }
}
+ // mark commit and displayed in the center
+ if (this.commits[i].id == this.options.commit_id) {
+ r.path([
+ 'M', x, y - 5,
+ 'L', x + 4, y - 15,
+ 'L', x - 4, y - 15,
+ 'Z'
+ ]).attr({
+ "fill": "#000",
+ "fill-opacity": .7,
+ "stroke": "none"
+ });
+ scrollLeft = x - graphWidth / 2;
+ }
+
this.appendAnchor(top, this.commits[i], x, y);
}
top.toFront();