hosuaby / Leaflet.SmoothMarkerBouncing

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

Mouse zoom doesn't preserve marker location #24

Closed elvisef closed 3 years ago

elvisef commented 4 years ago

While zooming, only one marker is still in place, other markers change locations. Zaznaczenie_271 Zaznaczenie_272

I fixed this here (commented out code):

L.Marker.prototype._setPos = function(pos) { oldSetPos.call(this, pos); // if(this._bouncingMotion === undefined) { // this._bouncingMotion = {}; // } this._bouncingMotion.x = pos.x; this._bouncingMotion.y = pos.y; this._calculateTransforms(); };

Please take a look at this, as this breaks functionality. Can someone confirm this ?

hosuaby commented 4 years ago

This code was added to work with cluster plugin. Do you use any other Leaflet plugins ?

elvisef commented 4 years ago

Nope, only this one.

hosuaby commented 4 years ago

Please, check if thide demo is working: http://hosuaby.github.io/Leaflet.SmoothMarkerBouncing/

hosuaby commented 3 years ago

Currently, this problem is confirmed only in case of plugin used on old (non 3D-enabled) browser.

hosuaby commented 3 years ago

Problem is not relevant for v2.0.1 because this code no longer exists. I will close this issue. If it re-appers it will be reopened.