From 867f24c7e0dd71f7ad880f6e0753ea259e1efa5c Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Fri, 6 Dec 2024 12:19:26 -0600 Subject: [PATCH] fix: Correct color propagation in node animation logic --- .../summary-delta-sync/propagation.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hugo-site/layouts/shortcodes/summary-delta-sync/propagation.html b/hugo-site/layouts/shortcodes/summary-delta-sync/propagation.html index b0c65271..c1e5bf73 100644 --- a/hugo-site/layouts/shortcodes/summary-delta-sync/propagation.html +++ b/hugo-site/layouts/shortcodes/summary-delta-sync/propagation.html @@ -397,18 +397,15 @@ .remove() .end(); - // Add colors to target after animation completes - let colorsAdded = false; - validColors.forEach(color => { - if (!target.data.receivedColors.includes(color)) { - target.data.receivedColors.push(color); - colorsAdded = true; + // Add new colors to target after animation completes + colors.forEach(colorEntry => { + if (!target.data.receivedColors.some(existing => existing.seq === colorEntry.seq)) { + target.data.receivedColors.push(colorEntry); } }); - if (colorsAdded) { - updateNodeColors(target); - } + // Update the node's visual appearance + updateNodeColors(target); } finally { // Clear animation flag when done animationQueue.delete(animationKey);