mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 16:44:26 +02:00
better flip logic fixes Issue #73
This commit is contained in:
parent
0332d92513
commit
44db45ce0d
7 changed files with 37 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue