in the midle of teamwork reorg why does promise not defer?

This commit is contained in:
Peter Cottle 2013-06-02 17:16:14 -07:00
parent 292126437a
commit bf6f987482
4 changed files with 129 additions and 58 deletions

View file

@ -102,6 +102,10 @@ var PromiseAnimation = Backbone.Model.extend({
this.set('deferred', options.deferred || Q.defer());
},
getPromise: function() {
return this.get('deferred').promise;
},
play: function() {
// a single animation is just something with a timeout, but now
// we want to resolve a deferred when the animation finishes