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.

Animate stops if map.updateSize() is executed while animation is running

See original GitHub issue

I am working on an app in Angular 8 for a year and i didn’t have a problem with this. I guess that it has to do with some major changes in Openlayers v6.

Describe the bug After upgrading to v6.1.1 from 5.3.3, i had a problem with animation process. When i initiate view.animate(...) and use all parameters well, i see part of the navigation and zoomin animation, but it stops after certain time (300ms) in my case.

To Reproduce Apart from this animate code i have part of my code that executes map.updateSize() method and it is executed after 300ms time out because of new elements that change viewport size (300ms is just an arbitrary value). When i found that this is causing the animation stop, i bound map size update to some click event and it stops the animation the same.

Expected behavior In the previous version (5.3.3) i had this size updating and it didn’t stop the animation. Not sure if this is a bug or expected changed behavior but it could break some more projects that rely on updating size after some viewport size changes.

Since this updateSize() is an important method in your API, i propose that you maybe add this to your API documentation for animation along side those other methods that cancel animation that you mentioned.

Either way, i fixed it by adding map size update method as callback to animate sequence. But this is only because for my case, animation happens after viewport changing elements are already shown.

Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jahowcommented, Feb 3, 2020

There is no funding for this that I know of, so the answer is no.

1reaction
jahowcommented, Dec 23, 2019

Hi,

Would you be able to provide a simple reproduction case in codepen or similar? Your description is a good start but actually investigating this issue will require to reproduce it one way or another. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is animating on event trigger causing an endless ...
Can anyone tell me how I can prevent my map from zooming in endlessly on itself when it loads, and instead only zoom...
Read more >
How to use the Timeline in Animate - Adobe Support
Extend or compress animations using timeline controls. Now, you can extend the frame duration of selected frames by entering desired number of ......
Read more >
Phaser 3 API Documentation - Class: Sprite
A Sprite Game Object is used for the display of both static and animated images in your game. Sprites can have input events...
Read more >
ol-map - Vue3 OpenLayers
ol-map. The core component of Vue3 OpenLayers ... Example of a simple map. ... When set to true , tiles will be loaded...
Read more >
How to Plot and Animate Data on Maps Using the R ...
4.1 The Example Data; 4.2 Generating the Animated Map; 4.3 Using Color to ... of this tutorial is to keep the map as...
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