awesome revert highlight down

This commit is contained in:
Peter Cottle 2013-06-04 14:31:14 -10:00
parent 2e10b6c173
commit a8fce5a4ab
3 changed files with 64 additions and 32 deletions

View file

@ -173,15 +173,25 @@ AnimationFactory.prototype.rebaseHighlightPart = function(animationQueue, rebase
this.delay(animationQueue, fullTime * 2);
};
AnimationFactory.prototype.genHighlightPromiseAnmation = function(commit, destBranch) {
var visBranch = destBranch.get('visBranch');
AnimationFactory.prototype.genHighlightPromiseAnimation = function(commit, destObj) {
// could be branch or node
var visObj = destObj.get('visBranch') || destObj.get('visNode');
var visNode = commit.get('visNode');
return new PromiseAnimation(makeHighlightAnimation(visNode, visBranch));
return new PromiseAnimation(makeHighlightAnimation(visNode, visObj));
};
AnimationFactory.prototype.playHighlightPromiseAnimation = function(commit, destBranch) {
var animation = this.genHighlightPromiseAnimation(commit, destBranch);
AnimationFactory.prototype.playHighlightPromiseAnimation = function(commit, destObj) {
console.log('playing highlight animation');
try {
var animation = this.genHighlightPromiseAnimation(commit, destObj);
console.log('aniamtion duration', animation.get('duration'));
animation.play();
console.log('aniamtion duration', animation.get('duration'));
animation.getPromise();
} catch (e) {
debugger;
console.log(e);
}
return animation.getPromise();
};