mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-07 05:04:30 +02:00
got rid of every underscore bind i think -- 1500 line diff
This commit is contained in:
parent
3833319476
commit
2257668f9d
21 changed files with 229 additions and 230 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue