mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-11 15:14:27 +02:00
weird part with rebase animation
This commit is contained in:
parent
01b9b1132d
commit
1bbdb5d6a0
4 changed files with 80 additions and 6 deletions
|
@ -28,8 +28,7 @@ AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, co
|
|||
// this takes care of refs and all that jazz, and updates all the positions
|
||||
gitVisuals.refreshTree(time);
|
||||
|
||||
visNode.setBirthPosition();
|
||||
visNode.setOutgoingEdgesBirthPosition();
|
||||
visNode.setBirth();
|
||||
visNode.parentInFront();
|
||||
|
||||
visNode.animateUpdatedPosition(bounceTime, 'bounce');
|
||||
|
@ -41,3 +40,34 @@ AnimationFactory.prototype.genCommitBirthAnimation = function(animationQueue, co
|
|||
duration: Math.max(time, bounceTime)
|
||||
}));
|
||||
};
|
||||
|
||||
AnimationFactory.prototype.genCommitBirthAnimationInSequence = function(animationQueue, index, commits) {
|
||||
if (!animationQueue) { throw new Error("rawrr"); }
|
||||
|
||||
var time = GRAPHICS.defaultAnimationTime * 1.0;
|
||||
var bounceTime = time * 2.0;
|
||||
var toHide = commits.slice(index + 1);
|
||||
var visNode = commits[index].get('visNode');
|
||||
|
||||
var animation = function() {
|
||||
visNode.parentInFront();
|
||||
|
||||
visNode.animateUpdatedPosition(bounceTime, 'bounce');
|
||||
visNode.animateOutgoingEdges(time);
|
||||
};
|
||||
|
||||
animationQueue.add(new Animation({
|
||||
closure: animation,
|
||||
duration: Math.max(time, bounceTime)
|
||||
}));
|
||||
};
|
||||
|
||||
AnimationFactory.prototype.refreshTree = function(animationQueue) {
|
||||
animationQueue.add(new Animation({
|
||||
closure: function() {
|
||||
console.log('refreshing tree from here');
|
||||
gitVisuals.refreshTree();
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue