Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "prerelease",
"comment": "Register 2x NYI stubs for NativeAnimatedModule",
"packageName": "react-native-windows",
"email": "adamgor@microsoft.com",
"commit": "7fe94c3453054779d8004da83f3e7efd1c433caa",
"date": "2019-10-24T00:22:31.233Z",
"file": "F:\\GS\\repo\\RNW\\change\\react-native-windows-2019-10-23-17-22-31-user-adamgor-fixStartAnimate.json"
}
14 changes: 14 additions & 0 deletions vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const char *NativeAnimatedModule::s_flattenAnimatedNodeOffsetName{"flattenAnimat
const char *NativeAnimatedModule::s_extractAnimatedNodeOffsetName{"extractAnimatedNodeOffset"};
const char *NativeAnimatedModule::s_addAnimatedEventToViewName{"addAnimatedEventToView"};
const char *NativeAnimatedModule::s_removeAnimatedEventFromViewName{"removeAnimatedEventFromView"};
const char *NativeAnimatedModule::s_startListeningToAnimatedNodeValueName{"startListeningToAnimatedNodeValue"};
const char *NativeAnimatedModule::s_stopListeningToAnimatedNodeValueName{"stopListeningToAnimatedNodeValue"};

NativeAnimatedModule::NativeAnimatedModule(const std::weak_ptr<IReactInstance> &reactInstance)
: m_wkReactInstance(reactInstance) {
Expand Down Expand Up @@ -132,6 +134,18 @@ std::vector<facebook::xplat::module::CxxModule::Method> NativeAnimatedModule::ge
const auto animatedValueTag = facebook::xplat::jsArgAsInt(args, 2);
NativeAnimatedModule::RemoveAnimatedEventFromView(viewTag, eventName, animatedValueTag);
}),
Method(
s_startListeningToAnimatedNodeValueName,
[this](folly::dynamic args) {
const auto viewTag = facebook::xplat::jsArgAsInt(args, 0);
NativeAnimatedModule::StartListeningToAnimatedNodeValue(viewTag);
}),
Method(
s_stopListeningToAnimatedNodeValueName,
[this](folly::dynamic args) {
const auto viewTag = facebook::xplat::jsArgAsInt(args, 0);
NativeAnimatedModule::StopListeningToAnimatedNodeValue(viewTag);
}),
};
}

Expand Down
2 changes: 2 additions & 0 deletions vnext/ReactUWP/Modules/Animated/NativeAnimatedModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ class NativeAnimatedModule final : public facebook::xplat::module::CxxModule {
static const char *s_extractAnimatedNodeOffsetName;
static const char *s_addAnimatedEventToViewName;
static const char *s_removeAnimatedEventFromViewName;
static const char *s_startListeningToAnimatedNodeValueName;
static const char *s_stopListeningToAnimatedNodeValueName;
};
} // namespace uwp
} // namespace react