Summary:
> What existing problem does the pull request solve?
Purely a documentation/example error. Was misled/wasted time debugging because of this issue.
Description:
`dx`/`dy` are zero in onPanResponderGrant, not `x0`/`y0`. `x0`/`y0` will be the coordinates relative to the granted element, which are rarely zero.
Closes https://github.com/facebook/react-native/pull/9984
Differential Revision: D4001603
Pulled By: hramos
fbshipit-source-id: 32580795f62394585ccfb8f9a2ae65b0b72add69
Summary:
For now, `PanResponder.create()` return a new object which may hold a handle
for interaction. The handle is created when the gesture starts, and it's cleared
when the gesture finishes.
However, the handle may become stale cause the owner (view) is removed or
re-rendered before the gesture finishes, which leaves InteractionManager
with handles that can never be removed.
In some cases, this blocks the app that waits for InteractionManager to
be idle and having leaky handles prevents InteractionManager from being idle
again.
The fix is to move the handle from the instance to the static variable, and
we'd clear it whenever a gesture finishes.
Reviewed By: sahrens
Differential Revision: D3550699
fbshipit-source-id: 412e9046a6cd9be34b3a7d572258008016a29f41
Summary:
In recent change in 2f73ca8 all javascript files under UIExplorer were moved to js subfolders but PanResponderExample link wasn't updated accordingly.
Closes https://github.com/facebook/react-native/pull/8725
Differential Revision: D3554851
fbshipit-source-id: 798b9a76ecb667512a23a405d0fee0691a9debce
Summary: This removes `node_modules/react` from the list of directories that are used for haste module resolutions. Modules required from React are now imported with `require('react/lib/…')`.
Reviewed By: astreet
Differential Revision: D3509863
fbshipit-source-id: 32cd34e2b8496f0a6676dbe6bb1eacc18124c01e
Summary:
Previously, `InteractionManager` was baked in at the lowest level to all touches via `ResponderEventPlugin`,
which meant that any time a finger was touching the screen, `InteractionManager` would be locked. This included while
doing 100% native scrolls, and thus would block progress from Relay, Incremental, or anything else scheduling events
through `InteractionManager`.
This diff switches to only bake it into `PanResponder` (and it remains hooked into `Animated` as before) which are the
main two cases where we need 60fps JS execution and want to queue up slower tasks.
This is done with a reusable higher-order-responder `InteractionManager.createResponderClass`.
Depends on FYI https://github.com/facebook/react/pull/6587, https://github.com/facebook/react/pull/6584
Reviewed By: sebmarkbage
Differential Revision: D3210951
fb-gh-sync-id: 682d21ac5cff704673b63d5942a903a3d8912835
fbshipit-source-id: 682d21ac5cff704673b63d5942a903a3d8912835