better flip logic fixes Issue #73

This commit is contained in:
Peter Cottle 2013-03-07 20:49:44 -08:00
parent 0332d92513
commit 44db45ce0d
7 changed files with 37 additions and 16 deletions

View file

@ -77,9 +77,9 @@ var VisBranch = VisBase.extend({
var commit = this.gitEngine.getCommitFromRef(this.get('branch'));
var visNode = commit.get('visNode');
var threshold = this.get('gitVisuals').posBoundaries.max;
var threshold = this.get('gitVisuals').getFlipPos();
// somewhat tricky flip management here
if (visNode.get('pos').x > threshold) {
if (visNode.get('pos').x > threshold || this.get('isHead')) {
this.set('flip', -1);
} else {
this.set('flip', 1);