forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the ScrollView to move scroll animation into helper and reus…
…ed in horizontal/vertical scrollview Summary: This diff refactors the scroll animation from `ReactScrollView` and `ReactHorizontalScrollView` into the `ReactScrollViewHelper` to reduce repeated code. The `Animator` is now shared between all the scroll views in the app, which I believe is the right behavior. It also helps to make the animator changes in future diffs apply to both horizontal and vertical scroll view. - Move `reactSmoothScrollTo` to `smoothScrollTo` in the helper class - This means one Animator for all ScrollViews - Move `updateStateOnScroll` to the helper class - Add interface for accessing instance scroll state properties in ScrollView - This means each ScrollView keeps their own scrolling state - Use `Point` class for pairs of x and y values Changelog: [Internal] Reviewed By: javache Differential Revision: D32372180 fbshipit-source-id: 529180eea788863689c3b440191ed50c5a6f04e5
- Loading branch information
1 parent
5e93cf6
commit 0731959
Showing
3 changed files
with
278 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.