Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Incorrect visual initialization of transform scale 0 #6278
Initializing a component with
The example code below demonstrates this problem. Tested on Android using React Native 0.21.
Initially pressing "Animate to 0" doesn't animate the first box at all because its "real" scale is 0. Pressing the other two texts makes it jump to 0 and animate to x from there.
The example also shows how normal components look visually identical when given scales of 0 and 1.
Also, same for height: 0 to height: 40 animation on Android, works normally on iOS. See http://stackoverflow.com/questions/35926051/why-does-rn-animated-timing-tovalue-of-0-not-animate for reference.
Setting scale to 0 seems to strip the component of other applied styles/transforms.
referenced this issue
Oct 2, 2016
I'm experiencing a similar issue, bit different though.
The scale animation runs through but as soon as it hits 0 the image is fully scaled again (back to scale: 1)
But setting the end value (0) to 0.0001 works fine.
This happens to me on Android and iOS with RN 0.40
Here is another example that doesn't even use
When a node has a scale set to 0, it seems to use it's last sibling's scale value.
Running the above example in the emulators has the same result:
iOS on the left, Android on the right:
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.