mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 09:20:03 +02:00
animation work
This commit is contained in:
parent
2ba6065a0d
commit
880e1ca630
5 changed files with 82 additions and 47 deletions
|
@ -103,10 +103,10 @@ var PromiseAnimation = Backbone.Model.extend({
|
|||
},
|
||||
|
||||
initialize: function(options) {
|
||||
if (!options.closure) {
|
||||
throw new Error('need closure');
|
||||
if (!options.closure && !options.animation) {
|
||||
throw new Error('need closure or animation');
|
||||
}
|
||||
// TODO needed?
|
||||
this.set('closure', options.closure || options.animation);
|
||||
this.set('deferred', options.deferred || Q.defer());
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue