openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 918 forks source link

Replace query marker fade animation with css #5307

Closed AntonKhorev closed 2 weeks ago

AntonKhorev commented 2 weeks ago

Fixes #5305.

Currently query markers are animated using javascript which requires managing timed events. We don't do it correctly, we don't cancel them when markers are removed. That's why #5305 happens.

This PR replaces the javascript animation with the css which doesn't require any event handlers. I could have added animation end events to remove the marker layer but once faded out it doesn't affect anything and it's cleaned up in page.unload.

AntonKhorev commented 2 weeks ago

Increased to 1500ms. Javascript event listeners run in the same thread with everything else including getting query results over the net.

tomhughes commented 2 weeks ago

This looks good now, thanks.