Skip to content

Commit

Permalink
fix: cancel pending onMouseMove events when onMouseLeave is invok…
Browse files Browse the repository at this point in the history
…ed (#2911)
  • Loading branch information
osamaqarem authored Oct 14, 2024
1 parent c677a4e commit 25333ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-games-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-voronoi-container": patch
---

Fix: #2369 `<VictoryVoronoiContainer/>` tooltip breaks when mouse moves quickly between different charts
1 change: 1 addition & 0 deletions packages/victory-voronoi-container/src/voronoi-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class VoronoiHelpersClass {
}

onMouseLeave = (evt, targetProps) => {
this.onMouseMove.cancel();
const activePoints = targetProps.activePoints || [];
this.onDeactivated(targetProps, activePoints);
const inactiveMutations = activePoints.length
Expand Down

0 comments on commit 25333ab

Please sign in to comment.