Compare commits
1 Commits
3-red-head
...
2-mouselea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c754316935 |
@@ -42,7 +42,7 @@ export default function TableViz({ config, rows, onEdit, onDelete }: Props) {
|
|||||||
<th className="text-right px-2 py-1 text-green-400">Green</th>
|
<th className="text-right px-2 py-1 text-green-400">Green</th>
|
||||||
)}
|
)}
|
||||||
{config.signal_type !== 'green' && (
|
{config.signal_type !== 'green' && (
|
||||||
<th className="text-right px-2 py-1 text-red-400">Red</th>
|
<th className="text-right px-2 py-1 text-red-400">Red (NP)</th>
|
||||||
)}
|
)}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -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