mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-10 14:44:28 +02:00
BOOM nice bouncing effect and prompt updates
This commit is contained in:
parent
986a2162af
commit
00111421bb
3 changed files with 24 additions and 9 deletions
|
@ -19,6 +19,7 @@ AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, co
|
|||
}
|
||||
|
||||
var time = GRAPHICS.defaultAnimationTime * 1.0;
|
||||
var bounceTime = time * 2;
|
||||
|
||||
// essentially refresh the entire tree, but do a special thing for the commit
|
||||
var visNode = commit.get('visNode');
|
||||
|
@ -31,11 +32,12 @@ AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, co
|
|||
visNode.setOutgoingEdgesBirthPosition();
|
||||
visNode.parentInFront();
|
||||
|
||||
visNode.animateUpdatedPosition(time);
|
||||
visNode.animateUpdatedPosition(bounceTime, 'bounce');
|
||||
visNode.animateOutgoingEdges(time);
|
||||
};
|
||||
|
||||
animationQueue.add(new Animation({
|
||||
closure: animation
|
||||
closure: animation,
|
||||
duration: Math.max(time, bounceTime)
|
||||
}));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue