onMouseEnter only called once when moved over overlapping circles
See original GitHub issueI’m currently plotting a lot of points on a map and some of them are overlapping each other. I want to show a popup when I hover over the points. Now I noticed that onMouseEnter
is not called when I move the mouse from one circle to another, when the two are overlapping and onMouseLeave
is not called in between.
I prepared an example for you. You have to zoom in a little bit until the circles look like for example in the following image. When you move your mouse horizontally over the circles, I would have expected a second console output as soon as the mouse is over an areas that is only covered by the second circle. However it isn’t.
Am I doing it wrong again or is this really a bug?
Thanks for the great work and your fast responses, that’s awesome!
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
For this kind of thing, I use a
GeoJSONLayer
and listen toonMouseMove
andonMouseLeave
. In yourmousemove
event handler, you get the hovered feature withevent.features[0]
(and can access other features that are hovered (if any) with [1], [2], etc…).mouseleave
is triggered when no feature is hoveredI am having the same issue, tried both events on the
<Layer />
and the<Feature />
Has anyone found a good way to handle this?