new level

This commit is contained in:
Peter Cottle 2013-03-09 18:29:12 -08:00
parent 7d54a4d928
commit fed2da64c0
9 changed files with 303 additions and 13 deletions

View file

@ -79,10 +79,13 @@ var VisBranch = VisBase.extend({
var threshold = this.get('gitVisuals').getFlipPos();
// somewhat tricky flip management here
if (visNode.get('pos').x > threshold || this.get('isHead')) {
this.set('flip', -1);
var flip;
if (visNode.get('pos').x > threshold) {
flip = (this.get('isHead')) ? 1 : -1;
this.set('flip', flip);
} else {
this.set('flip', 1);
flip = (this.get('isHead')) ? -1 : 1;
this.set('flip', flip);
}
return visNode.getScreenCoords();
},