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();