know why its beause git engine ready is async and we dont have origin until that fires so animation gets messed up

This commit is contained in:
Peter Cottle 2013-06-02 17:43:56 -07:00
parent f438948660
commit b69c35d548
3 changed files with 33 additions and 6 deletions

View file

@ -7327,8 +7327,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
);
originMaster.set('remote', true);
// add a simple refresh animation
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
};
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
@ -9222,6 +9221,16 @@ AnimationFactory.prototype.playCommitBirthPromiseAnimation = function(commit, gi
return animation.getPromise();
};
AnimationFactory.prototype.playRefreshAnimationAndFinish = function(gitVisuals, animationQueue) {
var animation = new PromiseAnimation({
closure: function() {
gitVisuals.refreshTree();
}
});
animation.play();
animationQueue.thenFinish(animation.getPromise());
};
AnimationFactory.prototype.overrideOpacityDepth2 = function(attr, opacity) {
opacity = (opacity === undefined) ? 1 : opacity;
@ -23250,8 +23259,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
);
originMaster.set('remote', true);
// add a simple refresh animation
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
};
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {
@ -31348,6 +31356,16 @@ AnimationFactory.prototype.playCommitBirthPromiseAnimation = function(commit, gi
return animation.getPromise();
};
AnimationFactory.prototype.playRefreshAnimationAndFinish = function(gitVisuals, animationQueue) {
var animation = new PromiseAnimation({
closure: function() {
gitVisuals.refreshTree();
}
});
animation.play();
animationQueue.thenFinish(animation.getPromise());
};
AnimationFactory.prototype.overrideOpacityDepth2 = function(attr, opacity) {
opacity = (opacity === undefined) ? 1 : opacity;

View file

@ -274,8 +274,7 @@ GitEngine.prototype.makeOrigin = function(treeString) {
);
originMaster.set('remote', true);
// add a simple refresh animation
this.animationFactory.refreshTree(this.animationQueue, this.gitVisuals);
this.animationFactory.playRefreshAnimationAndFinish(this.gitVisuals, this.animationQueue);
};
GitEngine.prototype.getOrMakeRecursive = function(tree, createdSoFar, objID) {

View file

@ -70,6 +70,16 @@ AnimationFactory.prototype.playCommitBirthPromiseAnimation = function(commit, gi
return animation.getPromise();
};
AnimationFactory.prototype.playRefreshAnimationAndFinish = function(gitVisuals, animationQueue) {
var animation = new PromiseAnimation({
closure: function() {
gitVisuals.refreshTree();
}
});
animation.play();
animationQueue.thenFinish(animation.getPromise());
};
AnimationFactory.prototype.overrideOpacityDepth2 = function(attr, opacity) {
opacity = (opacity === undefined) ? 1 : opacity;