Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NativeAnimated): Adds support for animated events #874

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

rozele
Copy link
Collaborator

@rozele rozele commented Nov 10, 2016

This adds support for Animated.event driven natively.

At the moment, it works by providing a mapping between a view tag, an event name, an event path and an animated value when a view has a prop with a AnimatedEvent object. Then we can hook into EventDispatcher, check for events that target our view + event name and update the animated value using the event path.

For now it works with the onScroll event but it should be generic enough to work with anything.

{
this._uiImplementation = uiImplementation;
_uiImplementation = uiManager.UIImplementation;
uiManager.EventDispatcher.AddListener(this);
Copy link
Collaborator Author

@rozele rozele Nov 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EventDispatcher [](start = 22, length = 15)

We may want to consider making this disposable / removable. #WontFix

This adds support for `Animated.event` driven natively.

At the moment, it works by providing a mapping between a view tag, an event name, an event path and an animated value when a view has a prop with a `AnimatedEvent` object. Then we can hook into `EventDispatcher`, check for events that target our view + event name and update the animated value using the event path.

For now it works with the onScroll event but it should be generic enough to work with anything.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant