From 4cfeb7cba024fc718aad1cfd00297d463ff8d394 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sat, 19 Sep 2026 17:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E5=9B=9E=EF=BC=9A=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E5=B9=B3=E6=BB=91=E6=9B=B2=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/CesiumGlobe.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/scene/CesiumGlobe.js b/src/scene/CesiumGlobe.js index 2e0cc86..7b95079 100644 --- a/src/scene/CesiumGlobe.js +++ b/src/scene/CesiumGlobe.js @@ -77,16 +77,15 @@ 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.arcTo(ox + arrowW, oy, ox + arrowW + radius, oy, radius); + // 上侧:一条曲线从尖端平滑过渡到上边缘(终点水平切线,无折角) + ctx.quadraticCurveTo(ox + arrowW * 0.7, oy, ox + arrowW, oy); ctx.lineTo(ox + w - radius, oy); ctx.arcTo(ox + w, oy, ox + w, oy + radius, radius); ctx.lineTo(ox + w, oy + h - radius); 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.lineTo(ox + arrowW, oy + h); + // 下侧:一条曲线从下边缘平滑过渡回尖端(起点水平切线) + ctx.quadraticCurveTo(ox + arrowW * 0.7, oy + h, ox, oy + h / 2); ctx.closePath(); if (selected) {