mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 09:20:03 +02:00
better escaping
This commit is contained in:
parent
6e7e06277e
commit
09ca30b224
4 changed files with 59 additions and 12 deletions
|
@ -107,8 +107,15 @@ GitVisuals.prototype.calcBranchStacks = function() {
|
|||
var thisId = branch.target.get('id');
|
||||
|
||||
map[thisId] = map[thisId] || [];
|
||||
map[thisId].push(branch.id);
|
||||
map[thisId].sort();
|
||||
map[thisId].push(branch);
|
||||
map[thisId].sort(function(a, b) {
|
||||
var aId = a.obj.get('id');
|
||||
var bId = b.obj.get('id');
|
||||
if (aId == 'master' || bId == 'master') {
|
||||
return aId == 'master' ? -1 : 1;
|
||||
}
|
||||
return aId.localeCompare(bId);
|
||||
});
|
||||
});
|
||||
this.branchStackMap = map;
|
||||
};
|
||||
|
@ -208,10 +215,11 @@ GitVisuals.prototype.addBranch = function(branch) {
|
|||
var visBranch = new VisBranch({
|
||||
branch: branch
|
||||
});
|
||||
branch.set('visBranch', visBranch);
|
||||
|
||||
this.visBranchCollection.add(visBranch);
|
||||
if (this.paperReady) {
|
||||
visBranch.genGraphics(paper);
|
||||
this.zIndexReflow();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue