From 776ab55fc3e9fad431702ce2bf0b3fd279420a37 Mon Sep 17 00:00:00 2001 From: Sakurasan <26715255+Sakurasan@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:59:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=82=A1=E7=A5=A8=E7=90=83=E8=B7=8C?= =?UTF-8?q?=E5=B9=85=E6=94=B9=E4=B8=BA=E7=BB=BF=E8=89=B2=E7=A9=BA=E5=BF=83?= =?UTF-8?q?=E7=90=83=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 涨: 保留分级实心(覆盖数越多越红) + 红色光晕; 跌: 绿色空心球(绿描边+内部淡绿留白) + 绿色光晕。 Co-Authored-By: Claude --- src/routes/hot-map.tsx | 45 ++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/routes/hot-map.tsx b/src/routes/hot-map.tsx index aca0ffb..303ae5c 100644 --- a/src/routes/hot-map.tsx +++ b/src/routes/hot-map.tsx @@ -406,23 +406,34 @@ function drawStockNodes( ctx.globalAlpha = 1; ctx.fill(); - // 外圈淡填充 - const fill = cover >= 7 ? "#dc2626" : cover >= 5 ? "#ef4444" : "#f97316"; - ctx.beginPath(); - ctx.arc(x, y, pr, 0, TAU); - ctx.fillStyle = fill; - ctx.globalAlpha = 0.35 * alpha; - ctx.fill(); - // 描边 - ctx.strokeStyle = cover >= 2 ? "#f59e0b" : "#94a3b8"; - ctx.lineWidth = cover >= 2 ? (cover >= 4 ? 2 : 1.5) : 0.5; - ctx.globalAlpha = alpha; - ctx.stroke(); - // 内实心 - ctx.beginPath(); - ctx.arc(x, y, pr, 0, TAU); - ctx.globalAlpha = (cover >= 2 ? 0.9 : 0.55) * alpha; - ctx.fill(); + if (isPos) { + // 涨:外圈淡填充 + 分级描边 + 内实心(覆盖数越多越红) + const fill = cover >= 7 ? "#dc2626" : cover >= 5 ? "#ef4444" : "#f97316"; + ctx.beginPath(); + ctx.arc(x, y, pr, 0, TAU); + ctx.fillStyle = fill; + ctx.globalAlpha = 0.35 * alpha; + ctx.fill(); + ctx.strokeStyle = cover >= 2 ? "#f59e0b" : "#94a3b8"; + ctx.lineWidth = cover >= 2 ? (cover >= 4 ? 2 : 1.5) : 0.5; + ctx.globalAlpha = alpha; + ctx.stroke(); + ctx.beginPath(); + ctx.arc(x, y, pr, 0, TAU); + ctx.globalAlpha = (cover >= 2 ? 0.9 : 0.55) * alpha; + ctx.fill(); + } else { + // 跌:绿色空心球(仅描边,内部淡绿留白) + ctx.beginPath(); + ctx.arc(x, y, pr, 0, TAU); + ctx.strokeStyle = "#22c55e"; + ctx.lineWidth = 2; + ctx.globalAlpha = dim ? 0.15 : 1; + ctx.stroke(); + ctx.fillStyle = "#22c55e"; + ctx.globalAlpha = dim ? 0.02 : 0.1; + ctx.fill(); + } // 选中外环 if (isActive) { ctx.beginPath();