Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #528 - The wait method of Chain.Wait should return a truthy val…

…ue so Fx:stop will not call the chainComplete event already
  • Loading branch information...
commit 96ac2b4e5ed41af91ad6694c6d31c50c4b0704e7 1 parent 6b0274e
@arian arian authored anutron committed
Showing with 19 additions and 0 deletions.
  1. +1 −0  Source/Class/Chain.Wait.js
  2. +18 −0 Specs/1.3/Class/Chain.Wait.js
View
1  Source/Class/Chain.Wait.js
@@ -29,6 +29,7 @@ provides: [Chain.Wait]
wait: function(duration){
return this.chain(function(){
this.callChain.delay(duration == null ? 500 : duration, this);
+ return this;
}.bind(this));
}
};
View
18 Specs/1.3/Class/Chain.Wait.js
@@ -47,4 +47,22 @@ describe('Chain.Wait', function(){
});
+ it('should not break the chainComplete event in Fx', function(){
+ var count = 0;
+ new Fx({
+ link: 'chain',
+ onChainComplete: function(){
+ count++;
+ },
+ duration: 50
+ }).start(0, 1).wait(40).start(1, 0);
+
+ waits(500);
+
+ runs(function(){
+ expect(count).toEqual(1);
+ });
+
+ });
+
});
Please sign in to comment.
Something went wrong with that request. Please try again.