deanhet / react-native-text-ticker

React Native Text Ticker/Marquee Component
MIT License
444 stars 75 forks source link

Animation jitter when only slightly larger than container #123

Closed derochedesign closed 1 year ago

derochedesign commented 1 year ago

I'm getting this animation jitter when the text is only a little longer than the given area:

https://user-images.githubusercontent.com/38788426/218218290-29a37d7f-39f1-4aed-8d1a-d00ac153e307.mov

I tried adding a bounceDelay but that only makes it do the same thing but slower.

Edit: setting bounce={false} does fix it, but if I wanted to let it bounce, how could i prevent it from going this fast?

deanhet commented 1 year ago

Hi! Have you tried the duration or bounceSpeed props?

derochedesign commented 1 year ago

Ah i see, i guess I just expected the bounceDelay to only delay the beginning and not also the end so I was confused. Slowing bounceSpeed (and adding a negative shouldAnimateThreshold) got me to the desired outcome. Thanks!