Real-time dashboard for monitoring global news, markets, and geopolitical events
TypeScript
Add pulsing animation to map hotspots
Reggie152a426b1d65
diff --git a/index.html b/index.htmlindex 14e1dc3..fc05f48 100644--- a/index.html+++ b/index.html@@ -138,18 +138,37 @@.attr('stroke', '#1a5040').attr('stroke-width', 0.5);+ // Add pulse animation style+ const style = document.createElement('style');+ style.textContent = `+ @keyframes pulse {+ 0% { r: 3; opacity: 0.9; }+ 50% { r: 6; opacity: 0.4; }+ 100% { r: 3; opacity: 0.9; }+ }+ .hotspot-pulse { animation: pulse 2s ease-in-out infinite; }+ `;+ document.head.appendChild(style);+// Draw hotspotshotspots.forEach(h => {const [x, y] = projection([h.lon, h.lat]);if (x && y) {- // Pulsing circle+ // Outer pulsing ring+ svg.append('circle')+ .attr('cx', x).attr('cy', y).attr('r', 6)+ .attr('fill', 'none').attr('stroke', '#00ff88')+ .attr('stroke-width', 1.5).attr('opacity', 0.6)+ .attr('class', 'hotspot-pulse');+ // Inner solid circlesvg.append('circle')- .attr('cx', x).attr('cy', y).attr('r', 4)- .attr('fill', '#00ff88').attr('opacity', 0.8);+ .attr('cx', x).attr('cy', y).attr('r', 3)+ .attr('fill', '#00ff88').attr('opacity', 0.9);// Labelsvg.append('text')- .attr('x', x + 6).attr('y', y + 3)+ .attr('x', x + 8).attr('y', y + 3).attr('fill', '#00ff88').attr('font-size', '8px')+ .attr('font-family', 'monospace').text(h.name);}});