Animation duration use seconds instead of milliseconds on iOS
See original GitHub issueDescribe the bug
It appears that iOS expects number values as seconds on layer properties like circleRadiusTransition.duration
, while Android uses milliseconds. This results in very slow animations on iOS if you initially tested on android.
To Reproduce Create a circle layer with the following style and animate it’s size:
<MapboxGL.CircleLayer
key={`circle`}
id={`circle`}
style={{
circleRadius: this.state.circleVisible ? 100 : 0,
circleRadiusTransition: {
delay: 0,
duration: 1000
},
circleOpacity: 0.5,
circleColor: "#000000"
}}
/>
Expected behavior Android and iOS should have the same behaviour.
Versions (please complete the following information):
- Platfrom: Android & iOS
- Device: Huwei Mate 20 Lite and iPhone 7 (also Simulator iPhone 11)
- OS: Android 9.1.0, iOS 13.2.3
- SDK Version: @react-native-mapbox-gl/maps@7.0.8
- React Native Version: 0.61.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Animation duration use seconds instead of milliseconds on iOS
It appears that iOS expects number values as seconds on layer properties like circleRadiusTransition.duration , while Android uses milliseconds.
Read more >animation-duration - CSS: Cascading Style Sheets | MDN
The time that an animation takes to complete one cycle. This may be specified in either seconds ( s ) or milliseconds (...
Read more >Run an animation with delay in swift - ios - Stack Overflow
So I want the button click to run the animation and delay the segue for like 3 seconds while running the animation, then...
Read more >Executing UX Animations: Duration and Motion Characteristics
Some animations (such as the one at 2.5 seconds into this video) are triggered as soon as the user scrolls to the appropriate...
Read more >Keyframe CSS Animation Delay Bug on iOS - Litmus
Keyframe CSS Animation Delay Bug on iOS ... And it's only happening on IOS. ... What about using milliseconds instead of seconds?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can definitely take a look at it soon-ish. The strange thing about this is that the Mapbox SDK itself is really vague about the transition parameters: https://docs.mapbox.com/ios/api/maps/5.5.0/Structs/MGLTransition.html#/c:@S@MGLTransition@FI@duration
@kristfal Quick question, since there are alot of transition style properties over various components, what would be a good way to implement this? Seems rather tedious to have to implement it manually across the whole code base.
valid issue, go away stalebot