-
Notifications
You must be signed in to change notification settings - Fork 111
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
Dragging the map #12
Comments
hi @lesley-w does the live example work for you? If it works, it's probably an issue with your code. |
On chrome version 59.0.3071.115 (Official Build) (64-bit), I can drag the map, but the slider doesn't move |
Strange I am on the same build of Chrome on Mac OSX and I can drag the map and move the slider in the live example with no problems. |
I'm on Windows 10 |
I did manage to replicate one bug though: if I drag the slider quickly before the page has finished loading then I can no longer drag the map. Some strange here... I won't have time to investigate much further, but maybe someone else can pick this up if they find the same bug. |
I've found out what is causing the problem. The cancelMapDrag function is being called twice, which means mapWasDragEnabled is set to true the first time, then map.dragging is disabled, which means the second time cancelMapDrag is called mapWasDragEnabled is being set to false. I think the function is being called twice because I have a touch-enabled laptop, so even though I am using the mouse to move the slider, I suspect both the mousedown event and touchstate events are being called and so |
I've managed to fix the issue by adding a dragCancelled flag to the cancelMapDrag/uncancelMapDrag functions. var dragCancelled = false; function cancelMapDrag() { dragCancelled = true; function uncancelMapDrag (e) { dragCancelled = false; |
I have the same problem.... In development stage it works sometimes, in production doesn't work at all.... |
I investigate a little bit more and I believe that the error comes from where you need to write something like that
same and on the |
When the side by side control is first loaded it is possible to drag the map, however, once the slider has been moved you can no longer drag the map.
The text was updated successfully, but these errors were encountered: