From 7ffcbbcfee31616dac9ade7470f8ee6c3efd6cde Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 16:16:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=BF=E7=AD=BE=EF=BC=9A=E6=9C=AA=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E9=87=91=E5=BA=95=E9=BB=91=E5=AD=97=E5=B8=A61px?= =?UTF-8?q?=E9=BB=91=E8=BE=B9=EF=BC=8C=E9=80=89=E4=B8=AD=E9=BB=91=E5=BA=95?= =?UTF-8?q?=E9=87=91=E5=AD=97=E5=B8=A6=E9=87=91=E8=BE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 5965a66..b91b3cf 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -90,22 +90,30 @@ function makeStickyNote(text, fontSize, selected = false) { ctx.closePath(); if (selected) { - // 先描粗边,再填充盖住内侧一半 → 外露 2px 干净黑边 - ctx.strokeStyle = '#14100d'; - ctx.lineWidth = B * 2; // 4px,外露 2px + // 选中:黑底金字,外圈 2px 金边(先描边再填充,外露一半) + ctx.strokeStyle = '#e0c46a'; + ctx.lineWidth = B * 2; ctx.lineJoin = 'round'; ctx.stroke(); + ctx.fillStyle = '#14100d'; + ctx.fill(); + ctx.fillStyle = '#e0c46a'; } else { - // 非选中:柔和的投影 + // 非选中:金底黑字 + 1px 黑边(描 2px,填充盖掉内侧 1px)+ 柔和投影 + ctx.strokeStyle = '#14100d'; + ctx.lineWidth = 2; + ctx.lineJoin = 'round'; + ctx.stroke(); ctx.shadowColor = 'rgba(0, 0, 0, 0.20)'; ctx.shadowBlur = 5; ctx.shadowOffsetY = 2; + ctx.fillStyle = '#e0c46a'; + ctx.fill(); + ctx.shadowColor = 'transparent'; + ctx.fillStyle = '#14100d'; } - ctx.fillStyle = '#e0c46a'; - ctx.fill(); - // 黑色加粗文字 - ctx.fillStyle = '#14100d'; + // 文字 ctx.font = font; ctx.textBaseline = 'middle'; ctx.textAlign = 'center';