From 46c6d2f34a088f049f24a6c90d1a0a870945aa39 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 17:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=BF=E7=AD=BE=E7=AE=AD=E5=A4=B4=E7=94=A8?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E8=B4=9D=E5=A1=9E=E5=B0=94=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E5=B9=B3=E6=BB=91=E8=BF=87=E6=B8=A1=E5=88=B0=E4=B8=BB=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index a19c75b..15ff13c 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -77,8 +77,11 @@ function makeStickyNote(text, fontSize, selected = false) { // 箭头 + 圆角矩形一体化路径(箭头尖端在 (ox, oy + h/2),指向坐标) ctx.beginPath(); ctx.moveTo(ox, oy + h / 2); - ctx.lineTo(ox + arrowW, oy + h / 2 - arrowH / 2); - ctx.lineTo(ox + arrowW, oy + radius); + // 上侧:平滑曲线从尖端连到左上角 + ctx.quadraticCurveTo( + ox + arrowW * 0.7, oy + h / 2 - arrowH / 2, + ox + arrowW, oy + radius, + ); ctx.arcTo(ox + arrowW, oy, ox + arrowW + radius, oy, radius); ctx.lineTo(ox + w - radius, oy); ctx.arcTo(ox + w, oy, ox + w, oy + radius, radius); @@ -86,7 +89,11 @@ function makeStickyNote(text, fontSize, selected = false) { ctx.arcTo(ox + w, oy + h, ox + w - radius, oy + h, radius); ctx.lineTo(ox + arrowW + radius, oy + h); ctx.arcTo(ox + arrowW, oy + h, ox + arrowW, oy + h - radius, radius); - ctx.lineTo(ox + arrowW, oy + h / 2 + arrowH / 2); + // 下侧:平滑曲线从下边缘连回尖端 + ctx.quadraticCurveTo( + ox + arrowW * 0.7, oy + h / 2 + arrowH / 2, + ox, oy + h / 2, + ); ctx.closePath(); if (selected) {