Border not animating with scale
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment: OS: macOS High Sierra 10.13.2 Node: 8.5.0 Yarn: 1.1.0 npm: 5.3.0 Watchman: 4.9.0 Xcode: Xcode 9.1 Build version 9B55 Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: ^0.51.0 => 0.51.0
Target Platform: Android (26+)
Steps to Reproduce
After upgrading to react-native 0.51.0, a component that used to be animated (scales up and down based on scroll) and that has a border (with border-radius too) no longer animates. The component itself still scales (verified by adding a background) but the borders don’t. Since there has been a lot of work on borders in 0.51.0 I am assuming this has to do with that.
Steps
- Create a component using
Animated.View
that has styles including a border. In my case this is
borderRadius: 88 / 2,
width: 88,
height: 88,
borderWidth: 4,
borderColor: 'rgba(0, 0, 0, 0.8)'
and add an animated variable as its transform: [{scale: ...}]
.
2. Make sure you are using react-native
0.51.0
3. Every aspect of the component will scale as the animated value changes, except for borders
Expected Behavior
Prior to upgrading to 0.51.0
the borders used to scale
Actual Behavior
Reproducible Demo
https://snack.expo.io/Sk6o8ZWMG
(Works on Appetize but not on actual phone)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:23 (4 by maintainers)
Reopening as this was introduced in 0.48 and is still present as of 0.54
Seems to have been fixed (for me at least), @VinceBT maybe?