-
Notifications
You must be signed in to change notification settings - Fork 82
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
Hover/mouseOver not working on Chrome #67
Comments
You use Leaflet 1.02, I had the same problem as you. My solution was to replace L.Browser.touch by L.Browser.mobile in leaflet.elevation-0.0.4.min.js. |
Very well, works for me too, @Jerome03 - thanks! |
Here is a demo of the issue: http://playground-leaflet.rhcloud.com/vok/edit?html,output The reason for this is that Leaflet.Elevation is registering either touch or mouse events based on
Technically, The way forward would probably be to support all available events, see e.g.:
Based on the demo above, I had a try at additionally listening to mouse events when http://playground-leaflet.rhcloud.com/tudo/edit?html,output But I'm seeing some issues, mostly because of unhandled simulated/compatibility mouse events:
I would suppose that compatibility mouse events are handled by d3 and Leaflet, but in our case there is a mixed use of d3 and Leaflet events that might cause some of these issues. E.g. Leaflet automatically adds pointer listeners for registered touch events, but d3 doesn't seem to handle pointer events yet. As I don't know right now why there is a mixed use of d3 and Leaflet events, and as I don't have enough devices to test, I currently don't feel like making a PR. Any takers? Any hints? |
Use this fork https://github.com/Raruto/leaflet-elevation It's up to date and works like a charm. |
For some reason, in my implementation, the mouseOver/Hover function doesn't work on Chrome but it works ok on Firefox. Since there is no such issue on http://mrmufflon.github.io/Leaflet.Elevation/example/example_gpx.html I assume it's some side-effect in my code. Any idea what could be causing this?
See https://www.xctrails.org/map/map.html?trail=1479625&type=xc as an example.
The text was updated successfully, but these errors were encountered: