mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
HEAD opacity working
This commit is contained in:
parent
9c1c9ed664
commit
3b58cf2912
5 changed files with 46 additions and 23 deletions
|
@ -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 = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue