bouncemarker.js: save original marker position in bounce()
#42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes moved markers bouncing at wrong position.
AFAICT from manual testing this doesn't change the current behavior when zooming in/out or panning the map.
If the current behavior is optimal is another question. E.g. should the drop point be re-calculated with panning? Most of the time, the bouncing marker seems to disappear when zooming in and out, until bouncing is complete or the original zoom level is restored. But as I said, that seems to be the case even before this change.
It would be preferable if the bouncing would be independent of zooming and/or panning. I.e. it should always drop the same distance in pixels on the screen. If that's achievable or not, I'm not invested enough to tell at the moment. Just food for thought.
However, since at least zooming in/out leaves a far from optimal experience, I would consider stopping the animation if the zoom level changes. At least until the zooming stops, then it might be desirable to restart it (re-calculating the starting values).
But I guess that could be left up to the user as well.
Fixes #39.