mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
b181b7797f
Summary: Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project. Let the script run, prior to fixing the errant files. The script outputs the following: ``` PATENTS crept into some new files? --- /dev/fd/63 2018-03-01 01:42:48.250153746 +0000 +++ /dev/fd/62 2018-03-01 01:42:48.250153746 +0000 @@ -1 +1,9 @@ +Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h +Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m +ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.java +ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLetterSpacingSpan.java +ReactCommon/yoga/yoga/YGLayout.cpp +ReactCommon/yoga/yoga/YGLayout.h +ReactCommon/yoga/yoga/YGStyle.cpp +ReactCommon/yoga/yoga/YGStyle.h scripts/circleci/check_license.sh Exited with code 1 ``` Fix the headers in these files and run the script again. No output, exit code 0. Closes https://github.com/facebook/react-native/pull/18143 Reviewed By: sophiebits Differential Revision: D7119356 Pulled By: hramos fbshipit-source-id: d238e4d4a3ae320a2c8e625c2fa29690057a4814
53 lines
1.5 KiB
Objective-C
53 lines
1.5 KiB
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "RCTTrackingAnimatedNode.h"
|
|
#import "RCTValueAnimatedNode.h"
|
|
#import "RCTNativeAnimatedNodesManager.h"
|
|
|
|
@implementation RCTTrackingAnimatedNode {
|
|
NSNumber *_animationId;
|
|
NSNumber *_toValueNodeTag;
|
|
NSNumber *_valueNodeTag;
|
|
NSMutableDictionary *_animationConfig;
|
|
}
|
|
|
|
- (instancetype)initWithTag:(NSNumber *)tag
|
|
config:(NSDictionary<NSString *, id> *)config
|
|
{
|
|
if ((self = [super initWithTag:tag config:config])) {
|
|
_animationId = config[@"animationId"];
|
|
_toValueNodeTag = config[@"toValue"];
|
|
_valueNodeTag = config[@"value"];
|
|
_animationConfig = [NSMutableDictionary dictionaryWithDictionary:config[@"animationConfig"]];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)onDetachedFromNode:(RCTAnimatedNode *)parent
|
|
{
|
|
[self.manager stopAnimation:_animationId];
|
|
[super onDetachedFromNode:parent];
|
|
}
|
|
|
|
- (void)performUpdate
|
|
{
|
|
[super performUpdate];
|
|
|
|
// change animation config's "toValue" to reflect updated value of the parent node
|
|
RCTValueAnimatedNode *node = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:_toValueNodeTag];
|
|
_animationConfig[@"toValue"] = @(node.value);
|
|
|
|
[self.manager startAnimatingNode:_animationId
|
|
nodeTag:_valueNodeTag
|
|
config:_animationConfig
|
|
endCallback:nil];
|
|
}
|
|
|
|
@end
|
|
|