hosuaby / Leaflet.SmoothMarkerBouncing

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

Possible bugs #51

Closed Falke-Design closed 1 year ago

Falke-Design commented 1 year ago

I have not much time to create a demo and dig deeper into it but I still wanted to let you know about this possible bugs:

  1. contractHeight: 0 causes an endless loop while setting the options
  2. bounce(2) only bounces twice on the first time. If I trigger bounce(2) on the same marker again, it bounce only one time.
hosuaby commented 1 year ago

Hello @Falke-Design Thanks for reports. I will check those problems ASAP.

hosuaby commented 1 year ago

Hello @Falke-Design.

I confirmed and fixed the first bug. Now it should not cause infinite loop in case where contractHeight = 0.

But I do not confirm the second one. Please, check the provided demo. If you click on football baloon, it will bounce three times, and if you click it again, it will bounce exactly three times again.

Falke-Design commented 1 year ago

@hosuaby I needed to search by my self what is the difference from your demo to my demo. I now found it. The problem is the exclusive option:

marker.setBouncingOptions({
  exclusive: true, // if this marker is start bouncing all others must stop
});
marker.bounce(2)
hosuaby commented 1 year ago

@Falke-Design I confirm the second observed bug and I fixed it. Both bugs were fixed in version 3.0.3. Thanks.