diff --git a/src/components/HeatMap.tsx b/src/components/HeatMap.tsx index 9c67cd7..ef12da7 100644 --- a/src/components/HeatMap.tsx +++ b/src/components/HeatMap.tsx @@ -91,20 +91,20 @@ export function HeatMap({ transactions }: HeatMapProps) { return; } - // 1. Hide canvas instantly (no transition) - canvas.style.transition = 'none'; - canvas.style.opacity = '0'; - // 2. Freeze current frame in the overlay try { overlay.src = canvas.toDataURL(); } catch { // canvas tainted (shouldn't happen with heatmap-only canvas) - canvas.style.opacity = '1'; update(); return; } + + // 1. Reset transitions instantly — force reflow to flush any running transition + canvas.style.transition = 'none'; overlay.style.transition = 'none'; + void canvas.offsetWidth; // force reflow + canvas.style.opacity = '0'; overlay.style.opacity = '1'; // 3. Update heatmap (invisible: canvas still at opacity 0)