mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-04 11:44:27 +02:00
awesome pull animation now
This commit is contained in:
parent
b090cef461
commit
d80ae31adc
7 changed files with 189 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
|||
var _ = require('underscore');
|
||||
var Backbone = require('backbone');
|
||||
var Q = require('q');
|
||||
|
||||
var Animation = require('./index').Animation;
|
||||
var PromiseAnimation = require('./index').PromiseAnimation;
|
||||
|
@ -133,6 +134,12 @@ AnimationFactory.playHighlightPromiseAnimation = function(commit, destObj) {
|
|||
return animation.getPromise();
|
||||
};
|
||||
|
||||
AnimationFactory.getDelayedPromise = function(amount) {
|
||||
var deferred = Q.defer();
|
||||
setTimeout(deferred.resolve, amount || 1000);
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
AnimationFactory.delay = function(animationQueue, time) {
|
||||
time = time || GRAPHICS.defaultAnimationTime;
|
||||
animationQueue.add(new Animation({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue