diff --git a/build/bundle.js b/build/bundle.js index 026c9913..3ef67e89 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -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; diff --git a/src/js/git/index.js b/src/js/git/index.js index fac83e56..2ffa5c3d 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -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) { diff --git a/src/js/visuals/animation/animationFactory.js b/src/js/visuals/animation/animationFactory.js index 4eb894d6..c1999e17 100644 --- a/src/js/visuals/animation/animationFactory.js +++ b/src/js/visuals/animation/animationFactory.js @@ -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;