WOW REALLY NICE with level switching

This commit is contained in:
Peter Cottle 2013-01-05 22:53:05 -08:00
parent 9460c4b4c6
commit 8e98c4d457
7 changed files with 154 additions and 61 deletions

View file

@ -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();
},