monterosalondon / react-native-parallax-scroll

Parallax scroll view for react-native
MIT License
555 stars 63 forks source link

support scaling from the top and make scale factor configurable #22

Closed EyMaddis closed 6 years ago

EyMaddis commented 6 years ago

This change allows you to change the origin of the scaling to the top of the view. In combination with setting the new property backgroundScale={2} the following effect:

result Source

I would have liked to change the default value of backgroundScale to 2, but it would not be API compatible.

z4o4z commented 6 years ago

Hi @EyMaddis , thanks for this cool PR! Can you add an example(storybook story) which will demonstrate this feature?

z4o4z commented 6 years ago

Hi @EyMaddis, I've just added this feature to the 1.7.0 version. Thanks a lot!

EyMaddis commented 6 years ago

@z4o4z Whoop whoop. My time is little, maybe I will open a storybook PR in the future.

Thanks for merging.

As far as I can see, this makes this library the only one in the React Native realm that supports that type of parallax effect. 👍

z4o4z commented 6 years ago

@EyMaddis no worry, I already added the examples. Maybe do you have some ideas for improving this lib?