fixed: use of outdated code in CPAnimationContext

This commit is contained in:
daboe01 committed 2022-03-26 22:38:10 +01:00
1 parent 51b633f0d7
commit f3f94eec66
1 file changed
+12 -16
+12 -16
View File
@@ -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];