hosuaby / Leaflet.SmoothMarkerBouncing

Smooth animation of marker bouncing for Leaflet.
BSD 2-Clause "Simplified" License
146 stars 28 forks source link

3.0 behaves differently #44

Closed bpolaszek closed 2 years ago

bpolaszek commented 2 years ago

Hello there! 👋

Are we supposed to expect a different bouncing behavior with 3.0.0?

I created a playground where:

It works well with 2.0.1, and it's completely broken in 3.0.0 (tested on Chrome 102, Firefox 101, MacOS)

Thanks, Ben

hosuaby commented 2 years ago

Hello @bpolaszek !

Thank you for reporting issue. Starting from 3.0.0 plugin uses CSS3 keyframes (instead of javascript like in 2.0.x) to make animation. I will check carefully your examples and will see how we can fix the differences in behavior.

bpolaszek commented 2 years ago

Hi @hosuaby, thanks for your quick answer. Apart from the animation, it looks like marker.setBouncingOptions() can only be called once - further calls just appear to be dismissed or at least have no effect on the animation.

hosuaby commented 2 years ago

@bpolaszek fix is made and will be available in 3.0.1.