Compare commits
1 Commits
v0.0.8
...
2-mouselea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c754316935 |
@@ -57,11 +57,11 @@ export function usePlot(
|
||||
|
||||
// Defer mouseleave — prevents React hydration events firing before lastIdxRef set
|
||||
requestAnimationFrame(() => {
|
||||
plot.over.addEventListener('mouseleave', () => {
|
||||
plot.over.onmouseleave = () => {
|
||||
const p = plotRef.current;
|
||||
if (!p) return;
|
||||
p.setCursor({ left: idxToPixel(p, lastIdxRef.current), top: -10 });
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
// deps is intentionally dynamic — passed by parent to allow external rebuild triggers
|
||||
|
||||
Reference in New Issue
Block a user