question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onMouseEnter only called once when moved over overlapping circles

See original GitHub issue

I’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.

screen shot 2017-09-26 at 5 48 53 pm

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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
SBRKcommented, Sep 27, 2017

For this kind of thing, I use a GeoJSONLayer and listen to onMouseMove and onMouseLeave. In your mousemove event handler, you get the hovered feature with event.features[0] (and can access other features that are hovered (if any) with [1], [2], etc…). mouseleave is triggered when no feature is hovered

0reactions
0radekcommented, Feb 13, 2020

I am having the same issue, tried both events on the <Layer /> and the <Feature />

Has anyone found a good way to handle this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

A-Frame: mouseenter/mouseleave for parent entity only
Because Your entire entity consists of a ring, and a small circle inside, the parent entity is just an empty holder for the...
Read more >
Moving the mouse: mouseover/out, mouseenter/leave
According to the browser logic, the mouse cursor may be only over a single element at any time – the most nested one...
Read more >
Interactions & Controllers - A-Frame
Since A-Frame provides mouse-drag controls by default, gaze-based can sort of be used on desktop to preview the interaction by dragging the camera...
Read more >
GraphObject | GoJS API
This functional property is only set on objects such as buttons, knobs, or sliders that want to handle all events, in conjunction with...
Read more >
Paper.js — SymbolItem
onMouseEnter. onMouseEnter. The function to be called when the mouse moves over the item. This function will only be called again, once the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found