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

Moving the map and changing the background causes the line you are drawing to disappear #4099

Closed
JamesKingdom opened this issue Jun 10, 2017 · 2 comments
Labels
bug A bug - let's fix this!

Comments

@JamesKingdom
Copy link
Collaborator

JamesKingdom commented Jun 10, 2017

Here is a video
Not sure what causes it, but I am using CTRL + B to switch backgrounds.
It also happens when going slower, seen here

Using
Google Chrome 58.0.3029.81 (Official Build) (64-bit)
Revision ac0bae59f0aa5b391517e132bf172144b1939333-refs/branch-heads/3029@{#746}
OS Windows
JavaScript V8 5.8.283.32

Thanks

@bhousel
Copy link
Member

bhousel commented Jun 12, 2017

Looks like this is an issue with the code introduced in a18d690.
The idea is to prevent window.location from changing while the user is drawing something (to avoid the situation where the user accidentally hit the back button and are transported very far away mid drawing)

The problem is that window.location also changes here if the user switches imagery. It fires off a hashchange event - then this code in hash.js checks what changed and if you happened to be moving the map and changing the background at the same time, you are tossed back into browse mode.

@bhousel bhousel added the bug A bug - let's fix this! label Jun 12, 2017
@JamesKingdom
Copy link
Collaborator Author

Thank you :) @bhousel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

No branches or pull requests

2 participants