Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for S2.FX.Parallel to notify aggregated objects about steps. #27

Merged
merged 1 commit into from

2 participants

@rafalwrzeszcz

There is a problem with S2.FX.Parallel that it doesn't invoke methods on aggregated effects like start() or cancel(), so it's callbacks won't be executed. What's more, effects can even not be completed, since cancel() is not called, which causes teardown() to not be called.

I believe those are two methods that have to be called on sub-effects to make them fully functional (start() marks effects as "running" as cancel() won't take any effect if status is not "running") - i don't see any need to call finish() on sub-effects (but if it would be needed, then canel() should not be called - only one of them should be called by parallel aggregator).

@madrobby madrobby merged commit 2c0b34b into madrobby:master
@madrobby
Owner

I've applied this—please think about adding tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 12, 2011
  1. @rafalwrzeszcz
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/effects/parallel.js
View
10 src/effects/parallel.js
@@ -55,5 +55,15 @@ S2.FX.Parallel = Class.create(S2.FX.Base, {
update: function(position) {
this.effects.invoke('update', position);
+ },
+
+ cancel: function($super, after) {
+ $super(after);
+ this.effects.invoke('cancel', after);
+ },
+
+ start: function($super) {
+ $super();
+ this.effects.invoke('start');
}
});
Something went wrong with that request. Please try again.