mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-30 20:07:36 +00:00
Allow nil completionFunction and fix fallback == nil
This commit is contained in:
1 parent
9844550d6c
commit
e9ae8063db
2 files changed
+5
-4
No files matched your search
@@ -130,7 +130,7 @@ CPLog.debug(_cmd + "context stack =" + _CPAnimationContextStack);
|
||||
var animByKeyPath = _animationsByObject.get(anObject);
|
||||
if (!animByKeyPath)
|
||||
{
|
||||
var newAnimByKeyPath = [CPDictionary dictionaryWithObject:resolvedAction forKey:aKeyPath];
|
||||
var newAnimByKeyPath = @{aKeyPath:resolvedAction};
|
||||
_animationsByObject.put(anObject, newAnimByKeyPath);
|
||||
}
|
||||
else
|
||||
@@ -163,7 +163,7 @@ CPLog.debug(_cmd + "context stack =" + _CPAnimationContextStack);
|
||||
{
|
||||
if (needsFrameTimer)
|
||||
[self stopFrameUpdaterWithIdentifier:objectId];
|
||||
else
|
||||
else if (animationCompletion)
|
||||
animationCompletion();
|
||||
|
||||
if (_completionHandlerAgent)
|
||||
|
||||
@@ -65,9 +65,10 @@
|
||||
var animation = [_target animationForKey:aKeyPath],
|
||||
context = [CPAnimationContext currentContext];
|
||||
|
||||
if ((!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || ![_CPObjectAnimator supportsCSSAnimations]) && fallback !== nil)
|
||||
if (!animation || ![animation isKindOfClass:[CAAnimation class]] || (![context duration] && ![animation duration]) || ![_CPObjectAnimator supportsCSSAnimations])
|
||||
{
|
||||
fallback();
|
||||
if (fallback)
|
||||
fallback();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user