Remove CPAnimationTriggerOrderIn partial support. Adds a warning if someone tries to use it.

This commit is contained in:
cacaodev
2016-06-12 10:20:26 +02:00
parent 5aa98966bc
commit e063ff5e54
+8 -30
View File
@@ -6,35 +6,6 @@
{
}
- (void)viewWillMoveToSuperview:(CPView)aSuperview
{
var orderInAnim = [self animationForKey:@"CPAnimationTriggerOrderIn"];
if (orderInAnim && [orderInAnim isKindOfClass:[CAPropertyAnimation class]])
{
[_target setValue:[orderInAnim fromValue] forKeyPath:[orderInAnim keyPath]];
}
[_target viewWillMoveToSuperview:aSuperview];
}
- (void)viewDidMoveToSuperview
{
var orderInAnim = [self animationForKey:@"CPAnimationTriggerOrderIn"];
if (orderInAnim && [orderInAnim isKindOfClass:[CAPropertyAnimation class]])
{
[self _setTargetValue:YES withKeyPath:@"CPAnimationTriggerOrderIn" fallback:nil completion:function()
{
[_target setValue:[orderInAnim toValue] forKeyPath:[orderInAnim keyPath]];
}];
}
else
{
[_target viewDidMoveToSuperview];
}
}
- (void)removeFromSuperview
{
[self _setTargetValue:nil withKeyPath:@"CPAnimationTriggerOrderOut" setter:_cmd];
@@ -190,6 +161,13 @@ var DEFAULT_CSS_PROPERTIES = nil;
+ (CAAnimation)defaultAnimationForKey:(CPString)aKey
{
// TODO: remove when supported.
if (aKey == @"CPAnimationTriggerOrderIn")
{
CPLog.warn("CPView animated key path CPAnimationTriggerOrderIn is not supported yet.");
return nil;
}
if ([self cssPropertiesForKeyPath:aKey] !== nil)
return [CAAnimation animation];
@@ -219,4 +197,4 @@ var DEFAULT_CSS_PROPERTIES = nil;
_animationsDictionary = [animationsDict copy];
}
@end
@end