question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animation duration use seconds instead of milliseconds on iOS

See original GitHub issue

Describe 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:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Hlesscommented, Jan 10, 2020

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.

0reactions
ferdicuscommented, Mar 11, 2020

valid issue, go away stalebot

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found