Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bouncemarker.js: save original marker position in bounce() #42

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

ulken
Copy link

@ulken ulken commented Sep 18, 2021

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.

Fixes moved markers bouncing at wrong position.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.bounce() always uses original position
2 participants