got rid of every underscore bind i think -- 1500 line diff

This commit is contained in:
Peter Cottle 2015-04-20 16:41:56 +10:00
parent 3833319476
commit 2257668f9d
21 changed files with 229 additions and 230 deletions

View file

@ -42,9 +42,9 @@ var AnimationQueue = Backbone.Model.extend({
},
thenFinish: function(promise, deferred) {
promise.then(_.bind(function() {
promise.then(function() {
this.finish();
}, this));
}.bind(this));
promise.fail(function(e) {
console.log('uncaught error', e);
throw e;
@ -97,9 +97,9 @@ var AnimationQueue = Backbone.Model.extend({
next.run();
this.set('index', index + 1);
setTimeout(_.bind(function() {
setTimeout(function() {
this.next();
}, this), duration);
}.bind(this), duration);
}
});
@ -127,9 +127,9 @@ var PromiseAnimation = Backbone.Model.extend({
// a single animation is just something with a timeout, but now
// we want to resolve a deferred when the animation finishes
this.get('closure')();
setTimeout(_.bind(function() {
setTimeout(function() {
this.get('deferred').resolve();
}, this), this.get('duration'));
}.bind(this), this.get('duration'));
},
then: function(func) {