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.

Gaps in `onMouseMove` on a Layer

See original GitHub issue

It seems that if you put a onMouseMove (or attach an event listener using a ref), once in a while there are gaps (~1s) between the event listener calls. It works well for a moment, and then stops invoking the listener for a while, just to go back to normal again.

This doesn’t happen when the event listener is placed directly on Stage.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lavrtoncommented, Jun 30, 2021

@DarkBitz for you use case, you can try to use Konva.capturePointerEventsEnabled = true. Or shape.setPointerCapture(stage.getPointerPosition().id);

Closing the issue for now. If any questions or issues. Please provide a demo.

0reactions
DarkBitzcommented, Jun 30, 2021

@lavrton So my problem was simply that the mouse was moved out of the rectangle and then released. Then the event was not applied to the rectangle. Seems to be a desired behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Gaps in `onMouseMove` on a Layer - - Bountysource
It seems that if you put a onMouseMove (or attach an event listener using a ref), once in a while there are gaps...
Read more >
mousemove with two layers on top of each other (overlapping)
Creating external "event manager" which will track whether I'm hovering the city and if is so will remove mousemove event from country-layer - ......
Read more >
Mousemove on Geoserver Tile with Leaflet
Code works nearly fine, but there is a vertical gap between the cursor position, and the layer retrieved by GetFeatureInfo request. This ...
Read more >
UUserWidget::OnMouseMove - Unreal Engine Documentation
The system calls this method to notify the widget that a mouse moved within it. This event is bubbled. Returns. Whether the event...
Read more >
Element: mousemove event - Web APIs | MDN
Returns the vertical coordinate of the event relative to the current layer. MouseEvent.metaKey Read only. Returns true if the meta key was down ......
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