oblador / react-native-animatable

Standard set of easy to use animations and declarative transitions for React Native
MIT License
9.82k stars 701 forks source link

iterationDelay should not apply before the first iteration #245

Open joelgetaction opened 5 years ago

joelgetaction commented 5 years ago

Hi,

Thanks for this awesome library!

If I have the following:

<Animatable.View
          animation="tada"
          iterationCount="infinite"
          delay={500}
          iterationDelay={3000}
          useNativeDriver
        >
          <Text>Hello, world!</Text>
        </Animatable.View>

then I would expect the delay before the first iteration/movement of tada would be 500 ms not 3000 ms. Instead, the first movement doesn't seem to happen until 3000 ms after the Animatable mounts. This is counterintuitive since I would expect the iterationDelay would only apply between iteration N and N+1, not before the first iteration/movement.

Is there some way I can make the animation delay X before the very first run of the animation and Y between iterations where X !== Y?

Thanks!

adamgeoffrion commented 4 years ago

Is there any update on this? I am running into this same issue.

HishamMubarak commented 4 years ago

@joelgetaction @adamgeoffrion I've submitted a pull request with a fix to this issue. Check #324 It worked for me, I hope it work for you too. Until it is verified and merged, you can either do the same changes inside your node_modules directory or create a fork and make the changes in fork and install the package from there. Cheers!