revert all done

This commit is contained in:
Peter Cottle 2013-06-04 14:34:47 -10:00
parent a8fce5a4ab
commit 6931992316
3 changed files with 48 additions and 6 deletions

View file

@ -7692,12 +7692,16 @@ GitEngine.prototype.revert = function(whichCommits) {
// set up the promise chain
_.each(toRebase, function(commit) {
chain = chain.then(function() {
chainStep(commit);
return chainStep(commit);
});
}, this);
// done! update our location
// this.setTargetLocation('HEAD', base);
chain = chain.then(_.bind(function() {
this.setTargetLocation('HEAD', base);
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
}, this));
this.animationQueue.thenFinish(chain, deferred);
};
@ -9229,6 +9233,16 @@ AnimationFactory.prototype.playRefreshAnimationAndFinish = function(gitVisuals,
animationQueue.thenFinish(animation.getPromise());
};
AnimationFactory.prototype.playRefreshAnimation = function(gitVisuals) {
var animation = new PromiseAnimation({
closure: function() {
gitVisuals.refreshTree();
}
});
animation.play();
return animation.getPromise();
};
AnimationFactory.prototype.overrideOpacityDepth2 = function(attr, opacity) {
opacity = (opacity === undefined) ? 1 : opacity;
@ -23643,12 +23657,16 @@ GitEngine.prototype.revert = function(whichCommits) {
// set up the promise chain
_.each(toRebase, function(commit) {
chain = chain.then(function() {
chainStep(commit);
return chainStep(commit);
});
}, this);
// done! update our location
// this.setTargetLocation('HEAD', base);
chain = chain.then(_.bind(function() {
this.setTargetLocation('HEAD', base);
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
}, this));
this.animationQueue.thenFinish(chain, deferred);
};
@ -31383,6 +31401,16 @@ AnimationFactory.prototype.playRefreshAnimationAndFinish = function(gitVisuals,
animationQueue.thenFinish(animation.getPromise());
};
AnimationFactory.prototype.playRefreshAnimation = function(gitVisuals) {
var animation = new PromiseAnimation({
closure: function() {
gitVisuals.refreshTree();
}
});
animation.play();
return animation.getPromise();
};
AnimationFactory.prototype.overrideOpacityDepth2 = function(attr, opacity) {
opacity = (opacity === undefined) ? 1 : opacity;

View file

@ -639,12 +639,16 @@ GitEngine.prototype.revert = function(whichCommits) {
// set up the promise chain
_.each(toRebase, function(commit) {
chain = chain.then(function() {
chainStep(commit);
return chainStep(commit);
});
}, this);
// done! update our location
// this.setTargetLocation('HEAD', base);
chain = chain.then(_.bind(function() {
this.setTargetLocation('HEAD', base);
return this.animationFactory.playRefreshAnimation(this.gitVisuals);
}, this));
this.animationQueue.thenFinish(chain, deferred);
};

View file

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