HEAD opacity working

This commit is contained in:
Peter Cottle 2012-09-29 09:43:37 -07:00
parent 9c1c9ed664
commit 3b58cf2912
5 changed files with 46 additions and 23 deletions

View file

@ -116,9 +116,28 @@ GitVisuals.prototype.calcGraphicsCoords = function() {
GitVisuals.prototype.calcUpstreamSets = function() {
this.upstreamBranchSet = gitEngine.getUpstreamBranchSet();
this.upstreamHeadSet = gitEngine.getUpstreamHeadSet();
};
GitVisuals.prototype.getCommitUpstreamStatus = function(commit) {
if (!this.upstreamBranchSet) {
throw new Error("Can't calculate this yet!");
}
var id = commit.get('id');
var branch = this.upstreamBranchSet;
var head = this.upstreamHeadSet;
if (branch[id]) {
return 'branch';
} else if (head[id]) {
return 'head';
} else {
return 'none';
}
};
GitVisuals.prototype.calcBranchStacks = function() {
var branches = gitEngine.getBranches();
var map = {};