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