mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-24 00:58:53 +00:00
fixed: use of outdated code in CPAnimationContext
This commit is contained in:
1 parent
51b633f0d7
commit
f3f94eec66
1 file changed
+12
-16
@@ -142,12 +142,7 @@ var _CPAnimationContextStack = nil,
|
||||
duration = [animation duration] || [self duration];
|
||||
needsPeriodicFrameUpdates = [[anObject animator] needsPeriodicFrameUpdatesForKeyPath:aKeyPath];
|
||||
|
||||
|
||||
var animatorClass = [[anObject class] animatorClass],
|
||||
needsPeriodicFrameUpdates = ((aKeyPath === @"frame" || aKeyPath === @"frameSize" || [[anObject animator] wantsPeriodicFrameUpdates]) && (objectId = [anObject UID]));
|
||||
|
||||
if (_completionHandlerAgent)
|
||||
_completionHandlerAgent.increment();
|
||||
var animatorClass = [[anObject class] animatorClass];
|
||||
|
||||
var completionFunction = function()
|
||||
{
|
||||
@@ -273,16 +268,7 @@ var _CPAnimationContextStack = nil,
|
||||
|
||||
- (void)getAnimations:(CPArray)cssAnimations getTimers:(CPArray)timers usingAction:(Object)anAction cssAnimate:(BOOL)needsCSSAnimation
|
||||
{
|
||||
var targetView = anAction.object,
|
||||
values = anAction.values,
|
||||
keyPath = anAction.keypath,
|
||||
isFrameKeyPath = (keyPath == @"frame" || keyPath == @"frameSize"),
|
||||
customLayout = [targetView hasCustomLayoutSubviews],
|
||||
customDrawing = [targetView hasCustomDrawRect],
|
||||
declarative_subviews_layout = (!customLayout || [targetView implementsSelector:@selector(frameRectOfView:inSuperviewSize:)]),
|
||||
needsPeriodicFrameUpdates = [[targetView animator] needsPeriodicFrameUpdatesForKeyPath:keyPath],
|
||||
timer = nil,
|
||||
animatorClass = [[targetView class] animatorClass];
|
||||
var values = anAction.values;
|
||||
|
||||
if (values.length == 2)
|
||||
{
|
||||
@@ -295,6 +281,16 @@ var _CPAnimationContextStack = nil,
|
||||
return;
|
||||
}
|
||||
|
||||
var targetView = anAction.object,
|
||||
keyPath = anAction.keypath,
|
||||
isFrameKeyPath = (keyPath == @"frame" || keyPath == @"frameSize"),
|
||||
customLayout = [targetView hasCustomLayoutSubviews],
|
||||
customDrawing = [targetView hasCustomDrawRect],
|
||||
declarative_subviews_layout = (!customLayout || [targetView implementsSelector:@selector(frameRectOfView:inSuperviewSize:)]),
|
||||
needsPeriodicFrameUpdates = [[targetView animator] needsPeriodicFrameUpdatesForKeyPath:keyPath],
|
||||
timer = nil,
|
||||
animatorClass = [[targetView class] animatorClass];
|
||||
|
||||
if (needsCSSAnimation)
|
||||
{
|
||||
[animatorClass addAnimations:cssAnimations forAction:anAction];
|
||||
|
||||
Reference in new issue
Block a user