|
12 | 12 | #import <React/RCTStyleAnimatedNode.h> |
13 | 13 | #import <React/RCTUIManager.h> |
14 | 14 | #import <React/RCTValueAnimatedNode.h> |
| 15 | +#import <React/RCTColorAnimatedNode.h> |
15 | 16 |
|
16 | 17 | @implementation RCTPropsAnimatedNode |
17 | 18 | { |
@@ -118,17 +119,21 @@ - (void)performUpdate |
118 | 119 | for (NSNumber *parentTag in self.parentNodes.keyEnumerator) { |
119 | 120 | RCTAnimatedNode *parentNode = [self.parentNodes objectForKey:parentTag]; |
120 | 121 | if ([parentNode isKindOfClass:[RCTStyleAnimatedNode class]]) { |
121 | | - [self->_propsDictionary addEntriesFromDictionary:[(RCTStyleAnimatedNode *)parentNode propsDictionary]]; |
122 | | - |
| 122 | + RCTStyleAnimatedNode *styleAnimatedNode = (RCTStyleAnimatedNode *)parentNode; |
| 123 | + [_propsDictionary addEntriesFromDictionary:styleAnimatedNode.propsDictionary]; |
123 | 124 | } else if ([parentNode isKindOfClass:[RCTValueAnimatedNode class]]) { |
| 125 | + RCTValueAnimatedNode *valueAnimatedNode = (RCTValueAnimatedNode *)parentNode; |
124 | 126 | NSString *property = [self propertyNameForParentTag:parentTag]; |
125 | | - id animatedObject = [(RCTValueAnimatedNode *)parentNode animatedObject]; |
| 127 | + id animatedObject = valueAnimatedNode.animatedObject; |
126 | 128 | if (animatedObject) { |
127 | | - self->_propsDictionary[property] = animatedObject; |
| 129 | + _propsDictionary[property] = animatedObject; |
128 | 130 | } else { |
129 | | - CGFloat value = [(RCTValueAnimatedNode *)parentNode value]; |
130 | | - self->_propsDictionary[property] = @(value); |
| 131 | + _propsDictionary[property] = @(valueAnimatedNode.value); |
131 | 132 | } |
| 133 | + } else if ([parentNode isKindOfClass:[RCTColorAnimatedNode class]]) { |
| 134 | + RCTColorAnimatedNode *colorAnimatedNode = (RCTColorAnimatedNode *)parentNode; |
| 135 | + NSString *property = [self propertyNameForParentTag:parentTag]; |
| 136 | + _propsDictionary[property] = @(colorAnimatedNode.color); |
132 | 137 | } |
133 | 138 | } |
134 | 139 |
|
|
0 commit comments