mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 16:44:26 +02:00
WOW REALLY NICE with level switching
This commit is contained in:
parent
9460c4b4c6
commit
8e98c4d457
7 changed files with 154 additions and 61 deletions
|
@ -77,6 +77,14 @@ var VisBranch = VisBase.extend({
|
|||
getCommitPosition: function() {
|
||||
var commit = this.gitEngine.getCommitFromRef(this.get('branch'));
|
||||
var visNode = commit.get('visNode');
|
||||
|
||||
var threshold = this.get('gitVisuals').posBoundaries.max;
|
||||
// somewhat tricky flip management here
|
||||
if (visNode.get('pos').x > threshold) {
|
||||
this.set('flip', -1);
|
||||
} else {
|
||||
this.set('flip', 1);
|
||||
}
|
||||
return visNode.getScreenCoords();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue